Displaying a CATIA Part SmarTeam Attribute in a Title Block

The task described below shows how to ensure that the title block is automatically updated to display the part number of the associated Part.
A drawing title block contains information from various sources. It could look something like this, for example:
  • The contents of the Designer field is a SmarTeam property. Its source is a field in the CATIA Product profile card. It corresponds to the Created by... field.
  • The contents of the Part Number field is defined in CATIA. Property mapping enables this information to be available in the CATIA Part profile card as well.
  • The contents of the Material field is also defined in CATIA.
  1. Create a Part in a CATIA session.

  2. Use Edit>Properties to define its part number.

  3. Save the Part in the database.
    Default property mapping ensures that the Part Number field is automatically completed in the database.

  4. Create a drawing of the same Part.

  5. Design the title block creating a text with the Part Number information (see Designing the Title Block for more information).

  6. Save the Drawing document in the database.

  7. Use SmarTeam>Properties>Map a Text Value... to link this text to the Part Number property of the Drawing document (see Mapping a Text Value for more information).

  8. Launch the AttributesOfLinked.bs script (see Using SmarTeam Scripts in a CATIA Session for more information).
    The title block is updated and now displays the Part Number of the part.

Launching AttributesOfLinked.bs

When you launch the AttributesOfLinked.bs script, it:

  • analyzes the logical links to other associated documents (i.e. dependencies)
  • retrieves the value of the Part Number attribute for each associated document
  • generates a character string containing a list of all values retrieved (one per line)
  • stores the list of Part Numbers in the current document
  • repeats this procedure on all the children i.e. sheets of the Drawing document.

Customizing the AttributesOfLinked.bs Script

The AttributesOfLinked.bs script is designed to retrieve Part Number information from the linked documents. However, if you wish, you can:

  • modify the property to be retrieved by editing the script to change the value of the LinkedAttributeName variable
  • modify the property where the retrieved information is to be stored by editing the script to change the value of the MainAttributeName variable
  • retrieve more than one property by editing the script to duplicate the section starting with the following comment line:
  • Display information about the children.