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

来源:互联网 发布:自己如何制作软件 编辑:程序博客网 时间:2024/05/18 12:41
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
'*****************************************************************************
 '文件:Setcolorofentitiesshortcut.vbs
 '版本:1.0
 '版权:floodzhu(floodzhu@hotmail.com),2005.1.6
 '功能:遍历概念模型,把Entities的快捷方式的颜色设置为黄色。
 '*****************************************************************************
 
 '  dimfs,f
 '  setfs=CreateObject("Scripting.FileSystemObject")
 '  setf=fs.CreateTextFile("C:/PowerDesigner_vbs.log")
 dimindex
 index=0
 
 dimmodel
 setmodel=ActiveModel
 
 
 If(modelIsNothing)Then
   MsgBox"当前没有活动的模型。"
 ElseIfNotmodel.IsKindOf(PdCDM.cls_Model)Then
   MsgBox"当前模型不是概念模型。"
 Else
   Viewmodel
   MsgBoxindex&"个实体的快捷方式的颜色被设置。"
 EndIf
 
 '*****************************************************************************
 '函数:View
 '功能:递归遍历
 '*****************************************************************************
 subView(folder)
   dimnode
   foreachnodeinfolder.Entities
      ifnode.IsShortCutthen
         Visitnode
      endif
   next
   
   '对子目录进行递归
   dimsubFolder
   foreachsubFolderinfolder.Packages
      ViewsubFolder
   next
 endsub
 
 '*****************************************************************************
 '函数:Visit
 '功能:处理节点
 '*****************************************************************************
 subVisit(node)
   dimsym
   foreachsyminnode.symbols
      sym.FillColor= rgb(255,255,128)
      index=index+1
      'f.writelinesym.name&"●"&sym.FillColor
   next
 endsub<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>