Generating Your Files in a Standard or Extended Generation

You can use generated files to extend the standard generation for objects from OOMs, BPMs, and XSMs or to create a separate extended generation for any type of model. For extended generations, you can define a custom menu command.

To extend the standard BPM, OOM, or XSM generation from the Resource Editor:
  1. Select the Complement language generation property in the root of the extension file (see Extension File Properties) to have the extension file appear for selection on the Generation dialog Targets tab.
  2. Define generated files as appropriate.
  3. [optional] Define options in Generation\Options (see Example: Adding a Generation Option) to have them appear on the Generation dialog Options tab.
  4. [optional] Define commands in Generation\Commands and reference these commands in tasks (see Example: Adding a Generation Command and Task) to have them appear on the Generation dialog Tasks tab.
Alternatively, to define separate file generations apart from the standard language generation for a PDM or any type of model and make them available via the Tools > Extended Generation command
  1. [OOM, BPM, and XSM only] Deselect the Complement language generation property in the root of the extension file (see Extension File Properties).
  2. Define generated files as appropriate.

    The generation is immediately available on the Targets tab of the Generation dialog when you select Tools > Extended Generation.

  3. [optional] Create a command in the Tools menu to directly access your extended generation in its own dialog:
    1. Create a method in Profile\Model with the name you want to give to your command, and enter the following code (where extension is the code of the extension file):
      Sub %Method%(obj)
      
       Dim selection ' as ObjectSelection
       
       ' Create a new selection
       set selection = obj.CreateSelection
       
       ' Add object of the active selection in the created selection
       selection.AddActiveSelectionObjects
      
       ' Generate scripts for specific target
       InteractiveMode = im_Dialog
       obj.GenerateFiles "", selection, "extension"
       
      End Sub
      For more information about methods, see Methods (Profile).
    2. Create a menu in Profile\Model and select the Tools menu in the Location list (see Menus (Profile)).
    3. Add the method to the menu using the Add Command tool:

    4. Select the command specified (for example, Tools > My Generation) to open a custom Generation dialog, which does not have a Targets tab: