|
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.
|
|
|
-
Create a Part in a CATIA session.
-
Use Edit>Properties to define its part
number.
-
Save the Part in the database.
Default property mapping ensures that the Part Number field is
automatically completed in the database.
-
Create a drawing of the same Part.
-
Design the title block creating a text with the Part
Number information (see Designing the Title
Block for more information).
-
Save the Drawing document in the database.
-
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).
-
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.
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.
|
|