I have a data model in PowerDesigner. I wrote a vba-script that changes the description of a column to the value of the comment of the column. It does well. When I look at the column-properties I can see the new description. The problem is, that the new description does not appear in the table-overview. Only when I open the column-properties and close it with the ok-button, the new description appears in the table-overview. I have a lot of columns in my model, so... has it something to do with the object-hierarchy in PowerDesigner? My script:
option explicit
Dim kind, name, obj, c, a
kind = InputBox("(T)able or (V)iew")
name = InputBox("Enter name")
If kind = "T" Then
Set obj = ActiveModel.FindChildByName(name, cls_table)
ElseIf kind = "V" Then
Set obj = ActiveModel.FindChildByName(name, cls_view)
End If
For each c in obj.columns
c.SetAttribute "Description", c.comment
Next