PowerDesigner脚本:设置实体快捷方式的颜色

王朝mssql·作者佚名  2006-12-17
窄屏简体版  字體: |||超大  

PowerDesigner脚本:设置实体快捷方式的颜色

PowerDesigner脚本:设置实体快捷方式的颜色 '*****************************************************************************

'文件:Set color of entities shortcut.vbs

'版本:1.0

'版权:floodzhu( floodzhu@hotmail.com ),2005.1.6

'功能:遍历概念模型,把Entities的快捷方式的颜色设置为黄色。

'*****************************************************************************

' dim fs,f

' set fs = CreateObject("Scripting.FileSystemObject")

' set f = fs.CreateTextFile("C:\PowerDesigner_vbs.log")

dim index

index = 0

dim model

set model = ActiveModel

If (model Is Nothing) Then

MsgBox "当前没有活动的模型。"

ElseIf Not model.IsKindOf(PdCDM.cls_Model) Then

MsgBox "当前模型不是概念模型。"

Else

View model

MsgBox index & "个实体的快捷方式的颜色被设置。"

End If

'*****************************************************************************

'函数:View

'功能:递归遍历

'*****************************************************************************

sub View(folder)

dim node

for each node in folder.Entities

if node.IsShortCut then

Visit node

end if

next

'对子目录进行递归

dim subFolder

for each subFolder in folder.Packages

View subFolder

next

end sub

'*****************************************************************************

'函数:Visit

'功能:处理节点

'*****************************************************************************

sub Visit(node)

dim sym

for each sym in node.symbols

sym.FillColor = rgb(255, 255, 128)

index = index + 1

'f.writeline sym.name & " ● " & sym.FillColor

next

end sub

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航