Writing data from attributes to host parts

You can use host part attribute mapping to write data from attributes to a part when assigning materials. Host part attribute mapping can be configured to write data from an attribute of the assigned record in Granta MI to a host attribute or parameter on the part or body.

Note: Host part attribute mapping applies to all material assignment, including material assignment using a default exporter and CAE material model assignment.

If you have enabled assignment of processes, surface treatments, or colors, you can configure attributes from those records to be mapped on assignment, in the same way.

For example, you can use host part attribute mapping to support the display of Granta MI data attributes in 2D CAD drawings.

In the host applications that support it, host part attribute is defined in the following ways:
Host application Parameter or attribute that can be written to
Creo

When assigning to parts in Creo: A part parameter.

When assigning to bodies in Creo: A body parameter.
Note: For assignments made to Family Tables, any part parameters written by a Granta MI assignment will be blanked (rather than deleted) if the assignment is subsequently removed.
NX

An attribute on the body, plus (optionally) an identical attribute on the parent part.

  • By default, the mapped attribute is created at both body level and part level.
  • If the host configuration option DisablePartLevelAttributesWriting is set to true for NX, the attribute will not be created at part level.
    Note: Setting the DisablePartLevelAttributesWriting option to true is recommended if you are working with parts that contain multiple bodies.

Optionally, the mapping can specify an NX category that the body-level attribute and part-level attribute (where applicable) will be assigned to.

Teamcenter with NX

An attribute on the body in the NX model, plus (optionally) an identical attribute on the parent part in the NX model.

  • By default, the mapped attribute is created at both body level and part level.
  • If the host configuration option DisablePartLevelAttributesWriting is set to true for Teamcenter with NX, the attribute will not be created at part level.
    Note: Setting the DisablePartLevelAttributesWriting option to true is recommended if you are working with parts that contain multiple bodies.

Optionally, the mapping can specify an NX category that the body-level attribute and part-level attribute (where applicable) will be assigned to.

Note: Host part attribute mappings do not write any data to the Part object in Teamcenter.
HyperMesh A component property.
To enable host part attribute mapping:
  1. Open gateway.config in a text editor.
  2. In the <HostConfiguration> section, locate the assignment types you would like to enable:
    Assignment type Supported for these hosts Host configuration option
    Material Creo, NX, Teamcenter with NX, HyperMesh PartMaterialAttributeMapping
    Process Creo, NX, Teamcenter with NX PartProcessAttributeMapping
    Surface treatment Creo, NX, Teamcenter with NX PartSurfaceTreatmentAttributeMapping
    Color Creo, NX, Teamcenter with NX PartColorAttributeMapping
  3. In the configuration section for each host application, you can specify any number of mappings for each supported assignment type.

Example:

For example, the configuration below for Creo will write a single attribute on the part when a material or process is assigned, and two attributes (GRANTA_COLOR1 and GRANTA_COLOR2) when a color is assigned.

<Host a:host="MIMaterialsGateway_Creo"> 
    [...]
    <HostOption a:name="PartMaterialAttributeMapping">GRANTA_SPECIFICATION:Specification = {Specification}</HostOption> 
    <HostOption a:name="PartProcessAttributeMapping">GRANTA_CONDITION:Condition = {Condition}</HostOption>  
    <HostOption a:name="PartColorAttributeMapping">GRANTA_COLOR1:Color from Granta MI</HostOption> 
    <HostOption a:name="PartColorAttributeMapping">GRANTA_COLOR2:Written by MI Materials Gateway</HostOption> 
    [...]
</Host>