Instantiating a Power Copy From a VB Macro   

This topic provides you with information about the instantiation of Power Copies using macros. For more information, see Product Knowledge Template User's Guide: Methodology.
KT1 is required to instantiate a Power Copy from a VB macro.
To perform the scenario described below, you will need the following files:
This is the macro. Open this script and edit the path referencing the PowerCopyReference.CATPart file (Line 24).

This is the file that contains the Power Copy that is going to be instantiated. Note that the inputs of the Power Copy are 2 points and an extrude.

This is the part that will host the instantiated Power Copy. It also contains 2 points and an extrude, which are the inputs of the Power Copy.
  1. Open the PktDestinationPart.CATPart file. Note that this file is made up of an Extrude and of 2 points. These are the inputs of the Power Copy stored in the PowerCopyReference.CATPart file.

  2. From the Tools>Macro>Macros... command, access the Macros dialog box in CATIA. Click Macro libraries....

  3. In the Macro libraries dialog box, select the Directories option in the Library type scrolling list. Click Add existing library....

  4. In the Open a directory of macros dialog box, select the directory that contains the PktInstantiatePowerCopyVB.CATScript file that you have modified. Click OK when done. Click Close in the Macro libraries dialog box:  The macro contained in this directory is displayed in the Macros dialog box.

  5. Click Run. Your macro is run and your Power Copy is instantiated.