The application of VBScript in PD

Source: Internet
Author: User
Tags powerdesigner
VBScript


PowerDesigner 9 's Open and custom Configuration feature.





The introduction of Visual Basic scripting has enabled PowerDesigner 9 to have a powerful open feature. With this simple programming language, users can add the required functionality to their PowerDesigner applications as they wish.



In this design blueprint, we will explain this feature in detail through an example.


Brief introduction
Microsoft Corporation defines a simple scripting language and is widely used in the industry and all Windows platforms. This is the Visual Basic Script, which enables users to easily and quickly manipulate objects and objects collections in an application. PowerDesigner 9 provides support for the Visual Basic scripting language, which allows users to manipulate PowerDesigner objects in memory or to complete a variety of tasks related to them, such as browsing a module or a collection of objects for any object. To realize this function, we need to understand the meta model of PowerDesigner. As a result, PowerDesigner provides rich online help, including PowerDesigner object definitions and their object methods, for user action.



With VBScript, users can create a variety of powerful applications. such as loading and storing modules, accessing object definitions, checking property values of objects, changing object property values, or creating or deleting objects based on special needs.




How to create a VB Script
In PowerDesigner's Tools menu, users will see a new "Customize Command" submenu. With this menu, users can create new scripts and add them to the PowerDesigner menu for quick and easy invocation.



When you select the Edit/run Scripts command, a dialog window opens in which users can type or load VB Script code, complete tests, debug, and so on, and store or use standard functions to edit content. For easy reading and understanding, the code is all marked with eye-catching colors.




Figure 1 VB Script Editor



customizing menus

After you have finished testing and debugging your code, you need to save it as a script file. Users can use the Customize Commands option to create a new command in the PowerDesigner menu to quickly invoke the script that is created.




Figure 2: Custom Options dialog box



Online Help

In the VB Script Editor toolbar, click? button to get online Help for more information about the PowerDesigner meta model.




Figure 3:vb Script online Help



The online Help provides information about all the PowerDesigner objects. It lists the property values of these objects and the available collection state of objects. It also provides information about global variables, special data type formats, and global methods.





Example description

PowerDesigner provides a rich example library that explains in detail the various features that users can create with VB Script:

· To create a module and its objects
(Create an activity chart as a "copy" of the Business flowchart ... )

· Delete an object in a module
(Delete private properties in the OOM module ...)

· Creating objects
(Convert class to interface ...)

· Change Object Properties
(Inserts a prefix for all the domain names, copies the names to the code, and normalizes the code ...) )

· Perform certain inspection tasks, issue warning messages (for specific database checks, not from the standard PowerDesigner inspection process ...). )

· Production report









Instance

To better illustrate the simplicity of the code, let's take a look at an instance that creates a single section for each table in the current module (the following figure).







Extended PowerDesigner

With this powerful tool, users can further expand their functions and features on the basis of PowerDesigner, and develop a perfect application for different needs.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.