Extending product function with VBA : Running a macro : Macros provided with System Architect : SetAcV2Props.mac
  
SetAcV2Props.mac
Running the SetAcV2Props.mac macro
A MoDAF AcV-2 Acquisition Programme diagram is a visual representation of a group of System Projects, and the Project Milestones and Dependencies defined for them. The SetAcV2Props.mac macro enables you to change the behavior property values of existing AcV-2 Acquisition Programme diagrams.
When AcV-2 Acquisition Programme diagrams are created, the default values for the diagram properties (in the ‘Behaviour’ tab) are unchecked (that is, False). When you run the macro, you can choose which properties to change, and which (if any) to leave unchanged. Diagrams will not be updated if they are Locked, Checked Out or Frozen by users other than the user running the macro. The output window lists the diagrams that were updated, and if a diagram was not updated, it provides the reason why it was not.
See also AcV-2 Acquisition Programme diagram reference.
To run the SetAcV2Props.mac macro
1 Open the encyclopedia on which you want to run the macro. If you do not have an opened encyclopedia when you run the macro, System Architect asks you to open one.
2 Load the macro as described in Running a macro, and select the SetAcV2Props.mac macro in step 3 of the Loading a Macro Project section. The macro is located in the default application folder, C:\Program Files\UNICOM Systems\System Architect Suite\System Architect.
3 Click Tools > Macros > Macro Projects.
4 The Macros dialog will list all macros in All Projects loaded, or just the macros for a particular macro project. You may select which macro projects to view from the Macros in list. The default is to list all macros in all projects.
5 Select the Set AcV-2 Acquisition Programme Diagram Behaviour Property Values macro. If the macro does not appear on the list, you may run it manually as follows: select Tools > Macros and select Microsoft Visual Basic Application Editor. In the Projects pane, expand the SetAcV2Props and the Forms node. Select the frmSetAcV2Properties form and click the Run Macro button on the Microsoft VBA toolbar. The form below is displayed.
6 Select the values for the properties you want to change. Note that the OK button is only enabled if you change at least one property.
7 Click OK to run the macro.
The Set AcV-2 Acquisition Programme Diagram Behaviour Property Values progress dialog appears. When the macro completes, the Set AcV-2 Acquisition Programme Diagram Behaviour Property Values output window appears, listing the diagrams that were updated. If no AcV-2 Acquisition Programme diagrams exist in the encyclopedia, the output window displays a message with that information.
Note The first time you run the macro the default behavior is to make the property values False. If you run the macro a second time (without first closing the Microsoft VBA code window or the form designer window) then the form will display the original values before you changed them.
See also
Sample.mac
Macros provided with System Architect
Running a macro