Adding an External Document to a Document Template

This task shows how to insert a drawing into a part template and how it is updated at instantiation. The scenario is divided into the following steps:
  • Creating a drawing from an existing part
  • Creating the part template
  • Instantiating the part template and updates the generated drawing.
Note that the documents that can be added to part and assembly templates must belong to one of the following types:
  • .CATDrawing
  • .CATProcess
  • .CATAnalysis
Before performing this scenario, make sure that the Keep link with selected object is checked (Tools>Options...>Infrastructure>Part Infrastructure>General). See the Quick Reference topic for a comprehensive list of the interactions that can be performed on document templates.
  1. Open the PktPadtoInstantiate.CATPart file.

  2. From the Start>Mechanical Design menu, access the Drafting workbench. The New Drawing Creation Window is displayed.

  3. Select the All views configuration and click OK.

  4. The drawing corresponding to the pad is generated.

  1. Save your drawing and close the file. Click here to see the generated drawing.

  2. Go back to the PktPadtoInstantiate.CATPart file to create a part template.

    • Select Knowledge Templates>Document Template .... The Document Template Definition window is displayed.

    • Click Add... in the External documents field and select the .CATDrawing file you have created in the File Selection window (or use the PktPadDrawing.CATDrawing). Click Open.

    • Click the Inputs tab and select Sketch.1 and Sketch.2 in the geometry or in the specification tree.

    • Click the Published Parameters tab and click Edit List.... The Select parameters to insert window is displayed. Select the following parameters using the arrow button:

    • PartBody\Pad.1\FirstLimit\Length

    • PartBody\Pad.2\FirstLimit\Length

    • In the Published Parameters tab, select PartBody\Pad.1\FirstLimit\Length and rename it to Pad_Width in the Name: field, then select PartBody\Pad.2\FirstLimit\Length and rename it to Pad_Length.

    • Click OK to validate. Save your file and close it.

  3. Open the PktProduct.CATProduct  file.

  4. From the Start>Knowledgeware menu, access the Product Knowledge Template workbench (if need be).

  5. Click the Instantiate From Document icon () and select the PktPadtoInstantiate_result.CATPart containing the document template. Click Open. The Insert Object dialog box is displayed.

  6. Expand the PartBody\Pad.1 node in the specification tree, select Sketch.1, and make the appropriate selections in the opening Replace Viewer window (see graphic below). Click Close when done.

  1. Select Sketch.2 in the geometry or in the specification tree.

  2. Click Parameters and enter 10mm in the Pad_Width field and 90 in the Pad_Length field.

  1. Click Close and OK to validate. A message is fired indicating that the external document was regenerated. Click OK. The document template was instantiated. (see picture below).

  1. From the Window menu, access the generated .CATDrawing file. Right-click CATDrawing2 in the left part of the window and select Update Selection. The drawing is updated and matches the new product.