1 PowerDesigner in the generated database script, replace the comment column with the Name column as a field description as follows,
Open Tools-Execute Commands-run script and run the following script:
Option Explicitvalidationmode=Trueinteractivemode=Im_batchdim MDL'The current model'get the current active modelSet MDL =Activemodelif (MDL is nothing) Thenmsgbox"There is no current Model"ElseIf not MDL. IsKindOf (Pdpdm.cls_model) Thenmsgbox"The current model isn't an physical Data model."Elseprocessfolder mdlend If'This routine copy name to code for each table, each column and each view'Of the current folderPrivate Sub ProcessFolder (folder) Dim Tab'Running Table forEach TabinchFolder.tablesifNot tab.isshortcut thentab.comment=Tab.namedim Col'Running Column forEach colinchtab.columnscol.comment=Col.namenextendifNextdim View'Running View forEach viewinchfolder. viewsifNot view.isshortcut thenview.comment=View.nameendifNext'go into the sub-packagesDim F'Running FolderFor each f in folder. PackagesifNot f.isshortcut Thenprocessfolder fendifNextEnd Sub
2 PowerDesigner Database Reverse engineering assigns the Comment column script to the Name column
Open the Tools-Execute Commands-run script and run the following scripts:
Option Explicitvalidationmode=Trueinteractivemode=Im_batchdim MDL'The current model'get the current active modelSet MDL =Activemodelif (MDL is nothing) Thenmsgbox"There is no current Model"ElseIf not MDL. IsKindOf (Pdpdm.cls_model) Thenmsgbox"The current model isn't an physical Data model."Elseprocessfolder mdlend If'This routine copy name to code for each table, each column and each view'Of the current folderPrivate Sub ProcessFolder (folder) Dim Tab'Running Table forEach TabinchFolder.tablesifNot Tab.isshortcut ThenifLen (tab.comment) <>0Thentab.name=Tab.commentendifOn Error Resume Nextdim Col'Running Column forEach colinchTab.columnsifLen (col.comment) <>0Thencol.name=Col.commentendifOn Error Resume nextnextendifNextEnd Sub