When working with large or multiple models, it can sometimes be tedious to perform repetitive tasks, such as modifying objects using global rules, importing or generating new formats or checking models.
Such operations can be automated through scripts. Scripting is widely used in various PowerDesigner features. For example, to:
Create custom checks, event handlers, transformations, customs commands and custom popup menus (see Extension Files)
Communicate with PowerDesigner from another application (see Communicating With PowerDesigner Using OLE Automation)
Customize PowerDesigner menus by adding your own menu items (see Customizing PowerDesigner Menus Using Add-Ins).
Create VBscript macros and embed VBscript code inside a template for generation (see GTL Macro Reference).
You can access PowerDesigner objects using any scripting language such as Java, VBScript or C# (C Sharp). However, the scripting language used to illustrate our examples in this chapter is VBScript.
VBScript is a Microsoft scripting language. PowerDesigner provides integrated support for Microsoft VBScript so that you can write and run scripts to interact with metamodel objects in a development environment using properties and methods. Every PowerDesigner object can be read and modified (creation, update or deletion).