powerdesigner comment与name互转

tools --> Excute Commands --> Edit/Run Script


comment转name:

OptionExplicit

ValidationMode =True

InteractiveMode = im_Batch

Dimmdl'the current model

'get the current active model

Setmdl = ActiveModel

If(mdlIsNothing)Then

MsgBox"There is no current Model"

ElseIfNotmdl.IsKindOf(PdPDM.cls_Model)Then

MsgBox"The current model is not an Physical Data model."

Else

ProcessFolder mdl

EndIf

'This routine copy name into code for each table, each column and each view

'of the current folder

PrivatesubProcessFolder(folder)

DimTab'running table

foreachTabinfolder.tables

ifnottab.isShortcutthen

iflen(tab.comment) <>0then

tab.name = tab.comment

endif

OnErrorResumeNext

Dimcol'running column

foreachcolintab.columns

iflen(col.comment) <>0then

col.name =col.comment

endif

OnErrorResumeNext

next

endif

next

endsub

name转comment:


OptionExplicit

ValidationMode =True

InteractiveMode = im_Batch

Dimmdl'the current model

'get the current active model

Setmdl = ActiveModel

If(mdlIsNothing)Then

MsgBox"There is no current Model"

ElseIfNotmdl.IsKindOf(PdPDM.cls_Model)Then

MsgBox"The current model is not an Physical Data model."

Else

ProcessFolder mdl

EndIf

'This routine copy name into code for each table, each column and each view

'of the current folder

PrivatesubProcessFolder(folder)

DimTab'running table

foreachTabinfolder.tables

ifnottab.isShortcutthen

tab.comment = tab.name

Dimcol'running column

foreachcolintab.columns

col.comment= col.name

next

endif

next

Dimview'running view

foreachviewinfolder.Views

ifnotview.isShortcutthen

view.comment = view.name

endif

next

'go into the sub-packages

Dimf'running folder

ForEachfInfolder.Packages

ifnotf.IsShortcutthen

ProcessFolder f

endif

Next

endsub

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • This project was bootstrapped with Create React App. Belo...
    unspecx阅读 5,226评论 0 2
  • 官网 中文版本 好的网站 Content-type: text/htmlBASH Section: User ...
    不排版阅读 4,465评论 0 5
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,448评论 0 10
  • 冬至,可以开始数九了。 有时候会想一个问题,过一些年后,是不是也会像周围某些人那样对待这份工作,想想觉得还是不要,...
    蕾蕾酱心阅读 839评论 0 0
  • 幼时,糖是很珍贵的,定量供应,我们喝的奶粉冲泡时常常用水果糖代替白糖。我的父母总是把有限的白糖用在特殊的场合...
    绿老虎阅读 497评论 0 3