For some Item Types mandatory properties are required.
In this example we want to use the templates (seed part) CNS_METRIC_TEMPLATE and CNS_INCH_TEMPLATE and the Item Type " C4_CadenasItem" (names exemplarily), which is an item type with mandatory properties.
![]() | Note |
---|---|
If the used templates and item types are not set both in the |
Configure the *.pax file in order to use the following templates ...
... and the ItemType "C4_CadenasItem".
Configure ifnxteamcenter.cfg
in order to use the new templates (in compare to the minimal configuration) and the new ItemType:
[CreationOptions(is3d):include(CreationOptions)] TemplateName(isMMDoc)=?_ENCODE_PARTNAME("CNS_METRIC_TEMPLATE","A") <- Template Name changed TemplateName(isInchDoc)=?_ENCODE_PARTNAME("CNS_INCH_TEMPLATE","A") <- Template Name changed TC_TemplatePresentationName=Cadenas part <- Name changed TC_TemplateApplicationName=ModelTemplate <- unchanged TC_TargetItemType=Item,C4_CadenasItem <- Type "C4_CadenasItem" added TC_allowItemAltRep=Yes <- Now value "Yes"
Furthermore activate (set) the following keys:
If you would try an export in this state, you would get an error, because this configuration is using mandatory properties and these have to be stated in the ifnxteamcenter.cfg
.
To find out the mandatory properties and their internal name used by the interface configuration, record a journal (macro) in NX using the "Cadenas Item" type.
The following instructions will guide you through the process.
In the "Search" field, enter "journal" and then click on Record Journal.
In the Explorer, choose any location where you want to save the journal file and enter a name.
Open File -> New -> Item and in the dialog under Names and Attributes -> Item Type, in the list field, select Cadenas Item.
Perform a double-click in the Value field of ID.
Fill in any values in all lines.
Open the journal with a text editor and search for attributePropertiesBuilder1.Title.
After each occurrence of attributePropertiesBuilder1.Title you will also find a line with .Category and a line with .DataType.
attributePropertiesBuilder1.Title = "Item:c4_item_bool_prop_mdtr"; attributePropertiesBuilder1.Category = "C4_CadenasItem"; attributePropertiesBuilder1.DataType = NXOpen.AttributePropertiesBaseBuilder
.DataTypeOptions.Boolean;
The found entries have to be taken into the
ifnxteamcenter.cfg
. For this, have a look in the next section.
Create respective blocks and keys.
The next section will explain the schema which has to be used in order to create the keys and values.
In the block CadDocumentAttributes, create a key with the name found in the recorded journal under Title.
Add a second key with the same name, but attached .custom at the end.
In the key with ".custom" insert the following attributes taken from the journal as value:
category.<attribute from .Category>,type.<attribute from .DataType>
category. C4_CadenasItem ,type. boolean
In the key without ".custom" enter the found value from the journal as value.
Repeat all steps for all attributePropertiesBuilder1.Title found in the journal.