Creating a Visual Basic Action

You can create visual basic actions also known as macros with arguments.

  1. Enter arguments in the box located between the parentheses and click OK to add the macro to the document.

    The arguments must always be separated by a comma.

    A VB Scripts subnode is added to the tree below the Relations node. A VB Script object is added below this subnode.
  2. In the Visual Basic Action Editor, enter your script.
  3. Right-click VB Script.1 and select VB Script.1 object > Run.
    The Select Inputs for Script Arguments window appears.
  4. Select the arguments in the geometry or in the tree and click OK to run the script.

Notes:
  • You may also create a Visual Basic Action by clicking the relation defined in the tree and clicking Visual Basic Action .
  • Macros with arguments are features that can be stored in 3D Shapes and in knowledge engineering specifications and that can be called from a rule (VBScriptRun) or a reaction. In this case, arguments are passed from the rule.
  • The VB script features with arguments are provided with a context menu enabling you to launch the script.