How to add your knowledge

Connector class properties

    Table of contents
    No headers

    When creating new assets, it is possible to have them interact, in terms of parameter propagation, with other similar assets by assigning connector class properties. These properties control the asset parameters that should be referenced to achieve the desired connection behavior.

    The Connector Class Properties command lets you choose the connector class to be used for the asset. It also lets you specify the connector class property values that are to be used. These connector class properties are defined in a separate connector class file in .xml format. A set of system connector classes is provided with the product and used by the system assets. These connector class files are located on the local hard drive in the C:\ProgramData\Autodesk\Factory Design Suite(version)\FactoryLibrary folder.

    Additional custom connector classes can be defined.

    Procedures

    Connector class properties

    Defining connector class properties

    Use the following procedure to define connector class properties for a new asset.

    1.  On the ribbon, click Asset Builder tabAuthor panel Connector Class Properties. The Connector Class Properties dialog box appears.
    2. Select the desired connector class from the Connector Class File Name drop-down list. This list displays all the connector class files found in the set of available asset collections. To remove the connector class name from the list, click the button to the right of the drop-down list.
    3. Next, you assign connector class properties. Select the desired property from the Name drop-down list and the desired property value from the Value drop-down list.
    4. Click the OK button to define the connector class properties and close the dialog box.

    Creating custom connector classes

    You can define custom connector classes for new asset types that require connection behavior beyond the product-supplied connector classes. These can then be used to control parameter propagation behavior among assets assigned to the class.

    A connector class is defined by an XML file, using the extension .connectorclass. The elements of the connector class define the parameter mapping, and any conditional checks that are used to control the conditions in which the particular mappings are made.

    The structure of a connector class XML file is straightforward. Here is an example of a simple connector class file. The element descriptions follow.

    <connector>

    <ConveyorWidth value_source="parameter">Width</ConveyorWidth> <ConveyorHeight family_type="normal"

    value_source="parameter">Height</ConveyorHeight> <ConveyorHeight family_type="inclined" connector_name="Connector1"

    value_source="Parameter">UpperHeight</ConveyorHeight> <ConveyorHeight family_type="inclined" connector_name="Connector2"

    value_source="Parameter">LowerHeight</ConveyorHeight> <ConveyorHeight family_type="spiral" connector_name="UpperConnector"

    value_source="Parameter">UpperHeight</ConveyorHeight> <ConveyorHeight family_type="spiral" connector_name="LowerConnector"

    value_source="Parameter">LowerHeight</ConveyorHeight>

    </connector>

    Connector class files always use a root element named connector. This element contains a series of child elements that identify the parameters that are to be propagated between assets when they are connected and belong to the same connector class.

    The child elements define mapping groups. They can have any name desired and are used according to the following rules:

    • Each mapping group, which represents a certain parameter, should have a unique element name. In the example above, "ConveyorWidth" and "ConveyorHeight" represent the two mapping groups.
    • In a given asset, once a match is found for a parameter meeting the matching rules described below, testing of the current mapping group ends, and the next mapping group is processed. Therefore, mapping group elements should be specified in decreasing order of specificity - most specific to least specific.

    The value of these elements usually identifies the parameter name to be mapped (e.g., "Width" above). Both assets must provide a parameter matching this name, or no mapping will be performed.

    Attributes on these elements provide additional information to control the mapping operation. These attributes are described in the following table.

    Attribute Attribute Values Notes
    value_source Parameter (default) This specifies that the value for the mapping is to be provided by the identified parameter in the source asset.
      Constant This specifies that the value to be assigned will be a constant value, provided in the value attribute.
    value   This attribute provides the value to be used for the parameter when value_source is set to Constant.
    connector_name   This attribute is used to restrict the matching to a specific connector (by name). If the connector being used for the connection in the asset does not match this name, the mapping will be ignored.

    In addition to the above reserved attributes, additional attributes can be specified which define matching conditions. The attribute names (e.g., "family_type" in the above example) identify connector class properties. The values for these properties must be specified within the asset (using the Connector Class Properties dialog box) in order to facilitate matching. If the asset does not provide a matching connector class property, the mapping will be ignored.

    TipRather than creating an entirely new XML file, simply copy one of the existing files from the C:\ProgramData\Autodesk\Factory Design Suite(version)\FactoryLibrary folder. Provide a new name for the file and replace the existing parameters with those of your own. Be sure to remove any unnecessary elements.

    References

    Connector class properties

    Define connector class and property values for assets.

    Access:

    Ribbon: Asset Builder tab Author panel Connector Class Properties
    Connector Class File Name Use the drop-down list to select the desired connector class.
      Click this button to remove the selection from the Connector Class File Name drop-down list.
    Name Select the desired property from the drop-down list.
    Value Select the desired value from the drop-down list.
    Add Click the Add button after selecting Name and Value properties from the drop-down lists. The selections then appear in the Name and Value columns in the list box.
    Delete Select a property from the list box and click the Delete button to remove it.