Chapter 2 Resource Files and the Public Metamodel
Extended model definitions can be used to create new generation targets provided the following conditions are respected:
This type of generation is called extended generation, and is available from the Tools→Extended Generation command.
If you have several extended model definitions designed for extended generation, these will appear in the Targets page of the extended generation dialog box.
You can create commands in the Tools menu to directly access extended generation for a selected target. To do so you have to:
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, "specific target" End Sub
Where "specific target" is the code of the extended generation target.
For more information about creating methods, see "Methods (Profile)" in the Extending your Models with Profiles chapter.
The new command is displayed in the Tools menu.
The Targets tab does not display because the underlying method already specifies a generation target.
Copyright (C) 2008. Sybase Inc. All rights reserved. |
![]() |