Automating 2D Component Instance Creation
with VB Script

This task shows you how to record and run the creation of a 2D component instance.

Open the Position_Component.CATDrawing document.

1. Go to Tools > Macro and select Start recording.

2. Key in the macro name and click on start button.

3. Create a 2D component instance using the Instantiate Detail .

4. Stop the recording clicking the following icon or go to Tools > Macro and select Stop Recording.

Now you can create this 2D component instance automatically.

5. Delete the previous 2D Component instance. Go to Tools > Macro > Macros, select the macro and click the run button

This macro will be available only in this drawing.

6. A 2D component instance will be created at the same place as the previous one.