Chapter 2 Accessing Objects Using Scripts
In critical size models or when dealing with several models at the same time, it can be sometimes very tedious to perform repetitive tasks on a series of objects or models, for example modifying objects using global rules, importing or generating new formats or even checking models.
Those operations can be eased using scripts. Indeed, Scripting is the only flexible way to let you access and edit the PowerDesigner wide range of models, diagrams and objects. It also allows you to reuse the same subroutines or functions many times in different situations.
Scripting is widely used in various PowerDesigner features. For example, when you want to:
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 manual is VBScript.
VBScript is a scripting language powered by Microsoft that you can use to write scripts for automating lots of diverse operations. PowerDesigner provides an integrated support for Microsoft VBScript so that you can write and run scripts to act over PowerDesigner metamodel objects in a development environment using properties and methods. Every PowerDesigner objects can be read and modified (creation, update or deletion).
For more information on Microsoft VBScript, see the following Web address http://msdn.microsoft.com/scripting/default.htm?/scripting/vbscript/ .
For more information about the use of scripting to create custom checks, event handlers, transformations, custom commands and custom popup menus see the "Managing Profiles" chapter in the Advanced User Documentation .
For more information about the use of scripting in OLE Automation, see the "Communicating With PowerDesigner Using OLE Automation" chapter.
For more information about the use of scripting in the GTL, see "Using Macros" in the "Generation Reference Guide" chapter in the Advanced User Documentation .
For more information about the use of scripting to create add-ins, see the "Customizing PowerDesigner Menus Using Add-Ins " chapter.
Copyright (C) 2007. Sybase Inc. All rights reserved. |
![]() |