Composite text attributes (複合テキスト属性) 機能を使えば、2つ以上の属性をつなげることができます。
複合テキスト属性は、部屋、アイテム、オカレンス、および製品で利用可能で、既存の属性の値を別の属性の新しいテキスト値に連結することができます。
複合テキスト属性を作成するには、データベースへのスーパーユーザーアクセスが必要です。以下を参照してください。プロジェクトとデータベース管理.
既存の属性を組み合わせて、アイテム、オカレンス、または製品のテキストを構成する。
設定
複合テキスト属性を作成するには、dRofusデータベースへのスーパーユーザーアクセスが必要です。 詳しくは、アイテム複合テキスト属性の編集 をご覧ください。
この例では、次のように設定しています;
属性名を “Name (名前)- BIM ID” とし、アイテム・プロパティ・パネルの “General (一般)” グループに配置しました。ツールチップを入力し、プロパティパネルに含めました。フィールドとして "Name "と "BIM ID "を追加し、フィールド({0}と{1})をハイフンで結合することにしました (“Composite text (複合テキスト)” オプションを参照)。
アイテム・プロパティ・パネルの表示結果は次のようになります;
グループは青でハイライトされます。
次に、'BIM ID'と'Name'(オレンジ色でハイライト)の値は、新しい属性'Name - BIM ID'(黄色でハイライト)の複合テキスト属性で結合されています。
既存の属性とURLを組み合わせて複合テキストを作成する
次の例では、既存の属性とURLの一部を組み合わせて完全なURLを作成する方法を説明します。パーツのURLは静的な値となり、dRofus属性は別の静的な値となり、
これらを組み合わせて動的なURLを作成します。この例では、商品に複合テキストを使用します。
このプロセスは、オンラインURLや外部製品データベース内の製品へのリンクを作成することができます。
設定
設定は上記と同じパターンに従います。ただし、既存の2つの属性を追加する代わりに、1つの属性と静的URLを組み合わせます;
フィールド・オプションには、IKEAの製品へのURLの静的な部分 (黄色のハイライト)を単純に貼り付けました。
次に、dRofusの製品番号を追加して、複合テキスト属性を完成させました。この組み合わせによって、製品仕様への有効なURLが自動的に作成されます。
製品プロパティ・パネルの表示は次のようになります:
“Product URL (製品URL)” 属性では、既存のdRofus属性とURLの静的部分を組み合わせて完全なURLを作成するために複合テキストを使用しています。
いくつかの形式が用意されており、組み合わせの複雑さに制限はありません。
Format | Summary | Example |
---|---|---|
{0} | Returns the value as it is. | {0} ~ 0:A65 = A65 |
:C | Returns the numeric value as currency. | {0:C} ~ 0:55674.74 = $55,674.74 |
:E | Returns the numeric value as scientific notation. | {0:E} ~ 0:123456789 = 1.234568E+008 |
:F | Returns the numeric value with a fixed number of decimals. | {0:F1} ~ 3.14159 = 3.1 |
:000.000 | Returns the numeric value with zero placeholders. | {0:0000} ~ 0:12.34 = 0012 |
:##.## | Retruns a numeric value where the # symbol is replaced with the corresponding digit if one is present; otherwise, no digit appears in the result. | {0:####} ~ 0:1234.5678 = 1235 |
:% | Returns the numeric value multiplied by 100 and with a percentage symbol. | {0:%} ~ 0:0.002 = 0.2% |
:‰ | Returns the numeric value mupliplied by 1000 and with a per mile symbol. | {0:‰} ~ 0:0.002 = 2‰ |
:d | Returns the short date representation of a date and time. | {0:d} ~ 0:4/18/2008 6:30:15 AM = 4/8/2008 |
:D | Returns the long date representation of a date and time. | {0:D} ~ 0:4/18/2008 6:30:15 AM = Friday, April 18, 2008 |
:t | Returns the short time representation of a date and time. | {0:t} ~ 0:4/18/2008 6:30:15 AM = 6:30 AM |
:T | Returns the long time representation of a date and time. | {0:T} ~ 0:4/18/2008 6:30:15 AM = 6:30:15 AM |
:F | Returns the long date and time representation of a date and time. | {0:F} ~ 0:4/18/2008 6:30:15 AM = Friday, April 18, 2008 6:30:15 AM |
:f | Returns the long date and short time representation of a date and time. | {0:f} ~ 0:4/18/2008 6:30:15 AM = Friday, April 18, 2008 6:30 AM |
:G | Returns the general date and time representation of a date and time. | {0:G} ~ 0:4/18/2008 6:30:15 AM = 4/18/2008 6:30:15 AM |
:g | Returns the general date and short time representation of a date and time. | {0:g} ~ 0:4/18/2008 6:30:15 AM = 4/18/2008 6:30 AM |
:M | Returns the month and day representation of a date and time. | {0:M} ~ 0:4/18/2008 6:30:15 AM = April 18 |
:Y | Returns the year and month representation of a date and time. | {0:Y} ~ 0:4/18/2008 6:30:15 AM = April 2008 |
:s | Returns the sortable date and time representation of a date and time. | {0:s} ~ 0:4/18/2008 6:30:15 AM = 2008-04-18T06:30:15 |
:U | Returns the universal date and time representation of a date and time. | {0:U} ~ 0:4/18/2008 6:30:15 AM = Friday, April 18, 2008 10:30:15 AM |
:u | Returns the universal, sortable date and time representation of a date and time. | {0:U} ~ 0:4/18/2008 6:30:15 AM = 2008-04-18 06:30:15z |
:dd/MM/yyyy HH-mm-ss | Returns the day, month, year, hour, minute and second representation of a data and time. These components can be modified freely. | {0:MM/dd/yyyy} ~ 0:4/18/2008 6:30:15 AM = 04/18/2008 |
:choose | Searches for a value in a list of options and outputs the corresponding value from a list of outputs. | {0: choose (1|2|3):one|two|three|other} ~ 0:2 = two |
:cond:<choices> | The value of the number determines the position in the list of choices. Values outside the range of choices will output the default. | {0:cond:First|Second|Default} |
:cond:<logic> | The value is tested against a range of logical comparisons with separate outputs. Comparisons can be combined using ‘&' for AND or '/’ for OR. | {0:cond:<=0?Unborn?|>=55?Senior|>=18?Adult|>12?Teenager|>?Child|Baby} ~ 0:35 = Adult |
:cond:{} | The value is checked if it is empty. If the value is empty, a placeholder value is returned: otherwise, the value is returned as it is. | {0:cond: { } | Empty} ~ 0: = Empty |
.ToLower | Returns the text in lower case. | {0.ToLower} ~ 0:Room = room |
.ToUpper | Retruns the text in upper case. | {0.ToUpper} ~ 0:Room = ROOM |
:substr | Returns a slice of the provided text. The slice is decided by a start position and optional end positions, starting from 0. | {0:substr (7) } ~ 0:Doctor Rofus = Rofus |