Share

Data Standard Configuration Files for AutoCAD and Inventor

The Data Standard Add-in for AutoCAD and Inventor provides two unique configuration files that determine Data Standard sheet behavior. Modify these behaviors to suit your design workflow.

You can dynamically set property configuration while a dialog is loaded (use the InitializeWindow function).

Note: This topic applies only to the Data Standard add-in for Inventor and AutoCAD.

The following behaviors are defined in the Data Standard configuration files.

  • Which fields and properties are available in Data Standard.
  • Where the file is saved.
  • The file name.
  • Inventor only–If Data Standard dialog is displayed automatically when saving.
  • Inventor only–If the Vault Check-in dialog is displayed.
  • AutoCAD only–Which AutoCAD Mechanical title blocks are supported.

Configuration File Details

There are two unique configuration files for the Data Standard Add-in for AutoCAD and Inventor.

  • Inventor.cfg
  • AutoCAD.cfg

You can find both of these files in C:\ProgramData\Autodesk\<Vault edition>\Extensions\DataStandard\CAD.

The CFG file is loaded only once when starting the CAD application.

File Elements

The configuration files are in XML format. Use a text editor or an XML editor to modify element values in the file.

Note: Most of the elements in the files are the same for Inventor and AutoCAD. However, some elements are only valid for either Inventor or AutoCAD. There are also small differences between some elements, depending on the file.

PathDefinition

Defines where the file is saved. The definition can be a mix of plain text or variables. The expression entered is evaluated every time the user enters or changes data. The closing back-slash is not required. The supported variables are:

  • {Workspace}

    This will contain the path to your workspace as defined in the project file.

  • {Prop[<property name>].Value}

    This is the value of the file property and changes as soon as the user enters data into a Data Standard dialog field mapped to the property <property name>.

    Sample:

    <PathDefinition>{Workspace}\{Prop[PROJECT].Value}</PathDefinition>

    In this sample, the path generated by Data Standard is the workspace folder set in the application plus the project name selected or entered into the Data Standard dialog. As the workspace will not change, this part is fixed, while the project path changes depending on the user data.

FileNameDefinition

Defines how the file is named. The definition can be a mix of plain text or variables. The expression is evaluated every time the user enters or changes data. The file extension is omitted but is automatically attached by Data Standard. The supported variables are:

  • {Prop[<property name>].Value}

    This is the value of the file property. The value changes as soon as the user enters data in a Data Standard dialog field mapped to the property <property name>.

    Samples:

    <FileNameDefinition>{Prop[TITLE].Value}</FileNameDefinition>

    The file name is generated out of the value of the Title property.

    <FileNameDefinition>{Prop[YEAR].Value}_{Prop[NUMBER].Value}</FileNameDefinition>

    The file name is generated out of the combination of the Year and Number properties with an underscore in between.

PropertyDefinitions

Contains one or more <PropertyDefinition> elements. The <PropertyDefinition> is the core of this configuration file and lets you define one or more properties.

Important: The PropertyDefinition is only required, if the (default) DynamicPropertyGrid control in the dialog is not used, or to apply overrides to the constraints, for example to set a property Required=True. Even Vault configuration (DynamicGrid) does not require a value for this property.

All the fields that will be accessible in the Data Standard dialog as a property must be defined here. The name of the property is also the name of the file or title-block attribute. If the property name matches an existing file property, such as "Title", it is used directly. Otherwise a custom property is created.

Sample:

...
<PropertyDefinitions>
    <PropertyDefinition PropertyName="DocNumber" DataType="Text" InitialValue="{PathAndFileNameHandler.FileName}" InitialCopyValue="{UIString[CFG2]} {PathAndFileNameHandler.OriginalFileName}" />
    <PropertyDefinition PropertyName="Title" DataType="Text" InitialCopyValue="{UIString[CFG1]} {Prop[Title].Value}" RequiresValue="true" />
    <PropertyDefinition PropertyName="Description" DataType="Text" />
    <PropertyDefinition PropertyName="Comments" DataType="Text" />   
    <PropertyDefinition PropertyName="Folder" DataType="Text" InitialValue="." RequiresValue="true"/>
    <PropertyDefinition PropertyName="Original" DataType="Text" InitialCopyValue="{PathAndFileNameHandler.OriginalFullFileName}" />
</PropertyDefinitions>
...

The available attributes for <PropertyDefinition> are:

Attribute

Required

Valid Values

Description

PropertyName

Yes

Characters and numbers

The name of the property.

DataType

Yes

Text, Date, Boolean, Integer, Double

Defines the data type and is required to create custom properties.

InitialValue

No

Depending on DataType:

Text– A combination of text and variables (see below).

Date– Valid date or "now" for the current date.

Boolean–– "true" or "false"

Integer, Double– Valid numbers.

Defines the initial value when saving a document for the first time.

InitialCopyValue

Note: Inventor Only

No

Depending on DataType:

Text– A combination of text and variables (see-below).

Date– Valid date or "now" for the current date.

Boolean–– "true" or "false"

Integer, Double– Valid numbers.

Defines the initial value when copying a document. This attribute is for Inventor only.

RequiresValue

No

true, false, or the name of a PowerShell function

Used for validation. With a PowerShell function more complex validation rules can be implemented.

The attributes InitialValue and InitialCopyValue allow the combination of plain text and variables for text properties. The supported variables are:

  • {PathAndFileNameHandler.<field>}

    Can be used to retrieve information about the internal filenames and locations of the document. Available fields are:

    • FileName: The filename of the document without the filepath.

    • FullFileName: The full path of the document.

    • OriginalFileName: Inventor only. Is available when copying documents and returns the filename of the original document without the filepath.

      For example: {UIString[CFG2]} {PathAndFileNameHandler.OriginalFileName} returns "Copy_of_Part1.ipt."

  • {Prop[<property name>].Value}

    Inventor only. Returns the value of the file property <property name>.

  • {UIString[<ID>]}

    Inventor only. Returns the value of the localized text string from UIStrings.xml specified by <ID>. See Localization for more details.

ShowCheckinDialog

Set to True or False to indicate whether the Vault check-in dialog is displayed when clicking OK on the Data Standard dialog for a document that is being saved for the first time.

SkipForProperties

Inventor only. This element is a comma-separated list of property names. The automatic Data Standard dialog is not shown for documents that have a file property which is in this list. One usage scenario is to skip the Data Standard dialog for third-party content center parts (e.g., Content center-generated parts).

Sample:

<SkipForProperties>CDN_B</SkipForProperties>

SupportedFileTypes

Inventor only. Defines which document types are supported. For example if you do not want the Data Standard dialog to display for Inventor DWG files, the element looks like this:

<SupportedFileTypes>IDW,IAM,IPT,IPN</SupportedFileTypes>

TitleBlock

AutoCAD only. This element is a comma-separated list of AutoCAD block names that are synchronized with Data Standard. Three settings are required and one additional is recommended to support legacy files.

Sample:

<TitleBlock>ISO_TITLEA,ISO_TITLEB,DIN_TITLE</TitleBlock>

Property Mapping for AutoCAD

Data Standard uses AutoCAD file properties, so the primary mapping of UDPs has to be configured to file properties.

Data Standard allows to synchronize the property values to block attributes. To achieve this, 3 settings are required and 1 additional recommended to support legacy files, not having file properties, but only block attributes

Property Mapping for Inventor

Was this information helpful?