PowerDesigner Comment和name相互转化

来源:互联网 发布:木工制图软件 编辑:程序博客网 时间:2024/06/04 19:09
感谢:


http://blog.csdn.net/laolaowhn/article/details/4427928

存档资料使用

name到comment

Option   Explicit  ValidationMode   =   True  InteractiveMode   =   im_BatchDim   mdl   '   the   current   model'   get   the   current   active   model  Set   mdl   =   ActiveModel  If   (mdl   Is   Nothing)   Then        MsgBox   "There   is   no   current   Model "  ElseIf   Not   mdl.IsKindOf(PdPDM.cls_Model)   Then        MsgBox   "The   current   model   is   not   an   Physical   Data   model. "  Else        ProcessFolder   mdl  End   If'   This   routine   copy   name   into   comment   for   each   table,   each   column   and   each   view  '   of   the   current   folder  Private   sub   ProcessFolder(folder)        Dim   Tab   'running     table        for   each   Tab   in   folder.tables              if   not   tab.isShortcut   then                    tab.comment   =   tab.name                    Dim   col   '   running   column                    for   each   col   in   tab.columns                          col.comment=   col.name                    next              end   if        next      Dim   view   'running   view        for   each   view   in   folder.Views              if   not   view.isShortcut   then                    view.comment   =   view.name              end   if        next      '   go   into   the   sub-packages        Dim   f   '   running   folder        For   Each   f   In   folder.Packages              if   not   f.IsShortcut   then                    ProcessFolder   f              end   if        Next  end   sub

comment到name,反向工程使用

Option   Explicit  ValidationMode   =   True  InteractiveMode   =   im_BatchDim   mdl   '   the   current   model'   get   the   current   active   model  Set   mdl   =   ActiveModel  If   (mdl   Is   Nothing)   Then        MsgBox   "There   is   no   current   Model "  ElseIf   Not   mdl.IsKindOf(PdPDM.cls_Model)   Then        MsgBox   "The   current   model   is   not   an   Physical   Data   model. "  Else        ProcessFolder   mdl  End   IfPrivate   sub   ProcessFolder(folder)  On Error Resume Next       Dim   Tab   'running     table        for   each   Tab   in   folder.tables              if   not   tab.isShortcut   then                    tab.name   =   tab.comment                   Dim   col   '   running   column                    for   each   col   in   tab.columns                    if col.comment="" then                   else                         col.name=   col.comment                    end if                   next              end   if        next      Dim   view   'running   view        for   each   view   in   folder.Views              if   not   view.isShortcut   then                    view.name   =   view.comment              end   if        next      '   go   into   the   sub-packages        Dim   f   '   running   folder        For   Each   f   In   folder.Packages              if   not   f.IsShortcut   then                    ProcessFolder   f              end   if        Next  end   sub
   PowerDesigner->Tools->Execute Commands->Edit/Run Scripts执行脚本


0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 天津车牌有指标想买车怎么办 上海大牌拍中了怎么办 买新车牌下不了怎么办 临沂上小学没报上名怎么办 早教中心倒闭了怎么办 企业税没交联系不上法人怎么办 企业被拉黑法人联系不到怎么办 支票根写错了怎么办 月结客户不付款怎么办 退市整理期过了怎么办 老板跑了财务负责人怎么办 在南京加入嘀嘀代驾怎么办 苹果盗刷支付宝怎么办 街电支付宝掉了怎么办 转转上号器没有苹果版的怎么办 安卓6不支持的应用怎么办 银行卡被存款机吞了怎么办 去银行卡存款机器故障怎么办 银行卡存款没有存进去怎么办 被黑网站黑钱了怎么办 饿了吗账户异常怎么办 单位里有人整你怎么办 乌鲁木齐信息采集结束后怎么办 头发很长时间不长怎么办啊 打嘟噜时间不长怎么办 阴茎勃起的时间不长怎么办 睡觉的时间不长怎么办 每次锻炼时间不长怎么办 微信好友不知道是谁怎么办 就一个软件闪退怎么办 葫芦侠修改闪退怎么办 戴尔游匣磁盘占用100怎么办 步步高家教机扫描笔不亮怎么办 社保卡手机号换了怎么办 香港公司进出口没有申报怎么办 智能电视右上角网络未连接怎么办 电子秤按键板不好用怎么办失灵 桑塔纳车钥匙锁车里了怎么办 舌头上有锯齿印怎么办 夏天有脚气脚臭怎么办 xp分辨率太高黑屏怎么办