0

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
  • I don't know what it is you call "overview" in the context of PowerDesigner. Is it the symbols? If yes, how do you get the Table symbol to show the column description? – pascal Apr 19 '17 at 14:38
  • If you save the model, and open it back, does it fix the mentioned table-overview? (in case this is a problem of cascading the Description update to all related places) – pascal Apr 19 '17 at 14:40
  • Thanks for your comments. With "overview" I mean the window when you doubleclick a table. In this window there's a tab "columns". Here you can see the names, datatypes... comments and description of the columns. And no, saving and reopening doesn't fix it... – derzeit Apr 20 '17 at 09:47
  • I have no idea, it works for me... In the list of Columns, it is `Description Text`which is shown, not `Short Description`, correct? Can you add a snapshot of this Columns list to be sure... Also you could try using c.SetAttributeText instead of c.SetAttribute. – pascal Apr 20 '17 at 15:26

0 Answers0