1、取消联动原因:做PDM设计的时候属性列的名称和编码联动实际上没有必要,这样会导致设计人员将列表写到备注字段,照成导出的设计文件会有问题,一般会将这个联动去掉。
依次单击工具栏中的【Tools】---->【General Options】;
在弹出框左侧导航栏选择【Dialog】,然后去掉右边的【Name to Code mirroring】选项前的勾选项
2、使用Powerdesigner工具将pdm文件的name同步至comment。
点击Tools->Execute Commands->Edit/Run Scripts
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl
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)
Dim Tab
for each Tab in folder.tables
if not tab.isShortcut then
tab.comment=tab.name
Dim col
for each col in tab.columns
if col.comment="" then
col.comment=col.name
end if
next
end if
next
end sub
3、使用Powerdesigner工具将pdm文件的comment同步至name。
点击Tools->Execute Commands->Edit/Run Scripts
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl
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)
Dim Tab
for each Tab in folder.tables
if not tab.isShortcut then
tab.name=tab.comment
Dim col
for each col in tab.columns
col.name=col.comment
next
end if
next
end sub
文章讲述了在PDM设计中取消名称与编码联动的必要性,以防止设计错误。提供了使用PowerDesigner工具进行Name与Comment同步的脚本,包括Name同步至Comment和Comment同步至Name的过程。
4215

被折叠的 条评论
为什么被折叠?



