欢迎光临
我们一直在努力

PowerDesigner脚本:设置实体快捷方式的颜色-数据库专栏,SQL Server

建站超值云服务器,限时71元/月

*****************************************************************************
 文件: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

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » PowerDesigner脚本:设置实体快捷方式的颜色-数据库专栏,SQL Server
分享到: 更多 (0)

相关推荐

  • 暂无文章