Chapter 9 Accessing objects using VBScript


Introducing PowerDesigner metamodel objects

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.

VBScript is a scripting language powered by Microsoft that you can use to write scripts for automating those 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/ .

PowerDesigner ships with a metamodel published in an Object Oriented Model (metamodel.oom) that illustrates how metadata interact in the software. All objects in the PowerDesigner metamodel have a name and a code. They correspond to the public name of the metadata. An HTML help file (pdvbs11.chm) is also provided to allows you to find out which properties and methods can be used to drill down to a PowerDesigner object.

For more information on metadata, see the "PowerDesigner Public Metamodel" chapter in the Advanced User Documentation .

PowerDesigner also provides a set of script samples that you can use as a basis to create your own scripts.

VBScript allows you to perform any kind of data manipulation but you can also insert and customize commands in the Tools menu that will allow you to automatically launch your own scripts.

Note   Limitations
You cannot access the following PowerDesigner features using VBScript: reverse engineering and all types of generations or algorithms such as rebuild index or rebuild data type links for example.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.