PowerDesigner的物理逻辑图如何显示注释呢?下面给出教学
工具/原料
PowerDesigner
方法/步骤
1、1.双击实体,会弹出实体的属性设置窗口(如下图所示),勾选comment选项
2、2.选择工具找到首选项,点击进入后设置table中属性Stereotype
3、3.工具->ExecuteCommands->Edit/RunScript执行命令脚本:脚本如下:OptionExplicitValidationMode=TrueInteractiveMode=im_BatchDimblankStrblankStr=Space(1)Dimmdl'thecurrentmodel'getthecurrentactivemodelSetmdl=ActiveModelIf(mdlIsNothing)ThenMsgBox"ThereisnocurrentModel"ElseIfNotmdl.IsKindOf(PdPDM.cls_Model)ThenMsgBox"ThecurrentmodelisnotanPhysicalDatamodel."ElseProcessFoldermdlEndIfPrivatesubProcessFolder(folder)OnErrorResumeNextDimTab'runningtableforeachTabinfolder.tablesifnottab.isShortcutthenDimcol'runningcolumnforeachcolintab.columnsifcol.comment=""orreplace(col.comment,"","")=""Thencol.stereotype=blankStrblankStr=blankStr&Space(1)elsecol.stereotype=col.commentendifnextendifnextDimview'runningviewforeachviewinfolder.Viewsifnotview.isShortcutthenview.stereotype=view.commentendifnext'gointothesub-packagesDimf'runningfolderForEachfInfolder.Packagesifnotf.IsShortcutthenProcessFolderfendifNextendsub
4、执行脚本后的实体如下: