Adding Attribute Links to Text

This task shows you how to add one or more attribute links to text. You will learn how to:

 

 

Creating an attribute link between a hole on the 3D part and the corresponding text in a drawing view

Open the GenDrafting_part.CATPart document and the GenDrafting_part_02.CATDrawing document.

 

  1. On the active view, double-click the text to which you want to add a link.


    An empty text is created in the drawing. The Text Editor dialog box is also displayed. Do not pay attention to this dialog box yet.

  2. In the drawing, right-click the text and select Attribute Link

  3. Select the object to which you want the text to be linked, from the specification tree (either from the 3D or from the CATDrawing document).
    For example, select Hole 2 from the CATPart specification tree.
     


    The Attribute Link Panel dialog box is displayed in the Drafting window:
     

  4. Select the "Part1\PartBody\Hole.2\Diameter   8.5mm" attribute from the list.

    The 8.5mm value automatically appears both in the Text Editor dialog box and on the CATDrawing.
     

     
  5. Click OK to validate and exit the dialog box.

  6. Modify the diameter value of Hole 2 on the CATPart. For example, change it to 13.5mm.

    Click Update in the CATDrawing. The views generated on the CATDrawing and the text attribute value are updated to take this modification into account.
     

     

    • At this step, you can perform a query on the link(s) you just created. To do so, right-click the view and select Query Objects Links. The Query Link Panel dialog box appears, displaying a list of the existing links.
    • You can only modify the part of the text that is not of the text attribute type.
      Modifying the text attribute requires isolating it first. To do so, right-click the text attribute and select Isolate Text.
    • You cannot replace text in attribute links (even though attribute links are displayed and the Replace button is available in the Links dialog box, which is available through Edit > Links).
    • To define the display of the attribute link to text, select Tools > Options > General > Parameters and Measure > Units tab.
 

Assigning an attribute link to a view

The GenDrafting_part_02.CATDrawing document is still open from the previous task.

 

Creating a parameter

  1. Click the Formula icon from the Standard toolbar.
    The Formulas: Drawing dialog box is displayed.

  2. In the drop-down lists next to the New Parameter of type button, choose the String with Single Value type.

  3. Click the New Parameter of type button.

  4. In the Edit name or value of the current parameter fields, replace String.1 by UserName in the first field, and enter the value, i.e. NameOfUser in the second field.
     

  5. Click Apply and then click OK. The parameter is created, and it is displayed in the Drafting specification tree, under the Parameters node.
     

    If the Parameters node in no displayed in the Drafting specification tree, go to Tools > Options > General > Parameters and Measure, Knowledge tab, and check the With value and With formula options.

Defining the Text Attribute

  1. Click the Text icon from the Annotations toolbar and click in the free space (under the Front View - Scale:1 text, for example). 
    An empty text is created in the drawing (in the active view). Also, the Text Editor dialog box is displayed. Do not pay attention to this dialog box yet.

  2. In the drawing, right-click on the empty text and select the Attribute Link option from the contextual menu. 

  3. From the specification tree, select the object which you want the text to be linked to. For example, select the CATDrawing document (GenDrafting_part_02 item at the very top of the specification tree). The Attribute Link Panel dialog box is displayed.

  4. Scroll down the list and select UserName in the Attribute List.

  5. Click OK. The value assigned to UserName, i.e. NameOfUser, is displayed in the Text Editor dialog box as well as on the drawing view.

  6. Click OK to close the Text Editor dialog box.
     

Modifying the Text Attribute

  1. Double-click the UserName parameter in the specification tree. The Edit Parameter dialog box is displayed.

  2. Change the parameter name (NameOfUser) to NewNameOfUser.

  3. Click OK.  The parameter name is automatically updated on the view.