Examining a Macro

Your Ad Here


  1. Click Edit Macro and open CreateCutExtrude.swp.

    The Visual Basic Editor and the Code window open. The Code window contains the SolidWorks API code generated for the macro.

  1. Click here to display the macro code in a browser.

Your macro may contain more lines of code than the displayed code if you performed any operations not specified in the previous exercise, for example, rotating the part.

  1. Delete any lines of code in your macro that do not appear in the displayed code.

    If Part.SketchManager.InsertSketch True does not appear in your code, you created the circle without first inserting a sketch.

  2. Type Part.SketchManager.InsertSketch True where it appears in the displayed code, if necessary.

Some arguments' numerical values in your macro may be different than those in the displayed code. These values reflect coordinates of the model. Do not modify the values in your macro to match the values in the displayed code.

  1. Close the browser displaying the code. Leave the Code window open.

Next

Return SolidWorks Help Index

Your Ad Here
??