将下面脚本粘贴到tools->execute commands->edit/run script里运行。
Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim 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 Private sub ProcessFolder(folder) On Error Resume Next Dim Tab 'running table for each Tab in folder.tables if not tab.isShortcut then 'if tab.comment="" then 'tab.comment = tab.name 'end if Dim isNeedAdd:isNeedAdd = true Dim col ' running column for each col in tab.columns if col.code="create_tm" then isNeedAdd = false end if next if isNeedAdd then Set col = tab.columns.CreateNew '创建一列/字段 If not col is Nothing then col.name = "create_tm" col.code = "create_tm" col.DataType = "datetime" output " col.name: " + col.name End If set col = nothing Set col = tab.columns.CreateNew '创建一列/字段 If not col is Nothing then col.name = "create_emp" col.code = "create_emp" col.DataType = "varchar(32)" output " col.name: " + col.name End If set col = nothing Set col = tab.columns.CreateNew '创建一列/字段 If not col is Nothing then col.name = "update_tm" col.code = "update_tm" col.DataType = "datetime" output " col.name: " + col.name End If set col = nothing Set col = tab.columns.CreateNew '创建一列/字段 If not col is Nothing then col.name = "update_emp" col.code = "update_emp" col.DataType = "varchar(32)" output " col.name: " + col.name End If set col = nothing end if 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创建数据库表图文并茂版
PowerDesigner中自动生成sqlserver字段备注
在用powerdesigner进行数据建模的时候,经常会遇到修改字段名,修改字段类型,在指定字段后面新加字段等操作,这个时候你可能就需要用脚本实现了,这个资料就是实现这些功能的,在powerdesigner15里测试可用
PowerDesigner数据库模型表内容大小写转换,可对表名称、字段名称、字段类型标识字符、主外键依赖等字符串进行大小写转换操作
PowerDesigner 16.5带数据修改表结构实例
PowerDesigner16.5逆向工程显示字段备注,生成的更贴合。使用的是命令运行的方式,本人亲试,非常方便。
powerdesigner逆向工程导入mysql脚本生成PDM带全注释
1,打开PowerDesigner,找到创建的物理模型(Physical Data Model), 2,使用快捷键,或者 在PowerDesigner菜单栏中,依次点击“Tools ->Excute Commands->Edit/Run Script..” 3,将下面代码粘贴到空白,点击Run 4,...
PowerDesigner字段与Oracle字段对应
powerdesigner 15 Oracle为表指定表空间,双击表,在弹出的属性页里面选择 Physical Options (Common)选项卡
powerDesigner 英文字段名修改为中文 这样比对不同表的时候对应字段
在powerdesigner中无法把中英文的字段名同时显示出来,只有通过把中文字段的含义拷贝到stereotype中才行。通过这个脚本文件将自动的把你的数据库中的所有字段的Name拷贝到stereotype中,非常方便。
使用powerdesigner生成表到数据库
powerDesigner导出数据表结构说明文档和写好的rtp模板,直接可以用,格式完美。
PowerDesigner 16.5 导出word使用手册,链接数据库的图片操作方法和数据库的表设计等属性配置
使用PowerDesigner导出表结构,结果清晰!便于维护表结构,查看数据库表结构。
PowerDesigner字段名生成备注说明脚本.vbs
Powerdesigner字段备注导入到数据库
PowerDesigner是Sybase的企业建模和设计解决方案,采用模型驱动方法,将业务与IT结合起来,可帮助部署有效的企业体系架构,并为研发生命周期管理提供强大的分析与设计技术。PowerDesigner独具匠心地将多种标准数据...
PowerDesigner从数据库中导出表结构