PowerDesigner table name, column name size write conversion

From Open Source China: https://my.oschina.net/chwencong/blog/52650

PowerDesigner table name, column name case conversion
Collection

  • Posted in 5 years ago
  • Read1896
  • Collection2
  • Like1
  • Comment 0

Method 1: Do not write vbs
PowerDesigner case conversion, no need to write vbscript , You can directly use the functions provided by the software to complete the conversion, just select the conversion table name: menu——Tools\Model Options…\Naming Convertion\Table under
conversion Field: Menu-under Tools\Model Options…\Naming convertion\Column

Method 2: Write vbs
in PowerDesigner PowerDesigner->Tools-> Execute Commands->Edit/Run Scripts (Ctrl Shift X), then paste the script below and run it.

'case conversion, the target is uppercase Option ExplicitValidationMode = TrueInteractiveMode = im_BatchDim mdl 'the current model 'Get the current ModelSet mdl = ActiveModelIf (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 mdlEnd < span class="hljs-keyword" style="">IfPrivate sub ProcessFolder(folder) 'Dim Tab for each Tab in folder.tables tab.code = UCase(tab.code)'Modify the field name Dim col for each col in tab.columns col.code= UCase(col.code) next 'Modify the index name Dim idx for each idx in tab.indexes idx.code= UCase(idx.code) next' Modify the primary key name Dim  key for each key in tab.keys key.code= UCase(key.code) next next' Treat views in the same way' Dim view' for each view in folder.Views' if not view.isShortcut then ' view.code = view.name' end if' next' go< /span> into the sub-packages Dim f ' running folder For Each f In folder .Packages if not f.IsShortcut then ProcessFolder f end if Next end sub

From Open Source China: https://my.oschina.net/chwencong/blog/52650
PowerDesigner table name, column name case conversion
Collection

  • Posted in 5 years ago
  • Read1896
  • Collection2
  • Like1
  • Comment0

From Open Source China: https://my.oschina.net /chwencong/blog/52650

PowerDesigner table name, column name case conversion

Collection

  • Posted in 5 years ago
  • Read1896
  • Favorite2
  • Like1
  • Comment0

Collection

Collection

  • Posted on 5 years ago
  • Read1896
  • Favorite2< /span>
  • Like1
  • Comment 0

Car, water and code farmer

Car and water code farmer

  • Published in < span id="" style="">5 years ago
  • Read1896
  • Collection 2
  • Like 1
  • Comment0

Method 1: No Write vbs
PowerDesigner case conversion, no need to write vbscript, directly use the functions provided by the software to complete the conversion, only need to select
Conversion table name: Menu——Tools\Model Options …\Naming Convertion\Table
Conversion field: Menu——Tools\Model Options…\Naming convertion\Column

Method 2: Writing vbs
In PowerDesigner, PowerDesigner->Tools->Execute Commands->Edit/Run Scripts (Ctrl Shift X), then paste the script below and run it.

'case conversion, the target is uppercase Option ExplicitValidationMode = TrueInteractiveMode = im_BatchDim mdl 'the current model 'Get the current ModelSet mdl = ActiveModelIf (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 mdlEnd < span class="hljs-keyword" style="">IfPrivate sub ProcessFolder(folder) 'Dim Tab for each Tab in folder.tables tab.code = UCase(tab.code)'Modify the field name Dim col for each col in tab.columns col.code= UCase(col.code) next 'Modify the index name Dim idx for each idx in tab.indexes idx.code= UCase(idx.code) next' Modify the primary key name Dim key  for each key in tab.keys key.code= UCase(key.code) next next' Treat views in the same way' Dim view' for each view in folder.Views' if not view.isShortcut then ' view.code = view.name' end if' next' go< /span> into the sub-packages Dim f ' running folder For Each f In folder .Packages if not f.IsShortcut then ProcessFolder f end if Next end sub

Method 1: Do not write vbs
PowerDesigner case conversion, no need to write vbscript, directly use the functions provided by the software to complete the conversion, only need to select
conversion table name: menu——Tools\Model O ptions…\Naming Convertion\Table
Conversion field: Menu——Tools\Model Options…\Naming convertion\Column

Method 2: Write vbs
in PowerDesigner PowerDesigner->Tools->Execute Commands->Edit/Run Scripts (Ctrl Shift X), then paste the following script into it and run it.

'case conversion, the target is uppercase Option ExplicitValidationMode = TrueInteractiveMode = im_BatchDim mdl 'the current model 'Get the current ModelSet mdl = ActiveModelIf (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 mdlEnd < span class="hljs-keyword" style="">IfPrivate sub ProcessFolder(folder) 'Dim Tab for each Tab in folder.tables tab.code = UCase(tab.code)'Modify the field name Dim col for each col in tab.columns col.code= UCase(col.code) next 'Modify the index name Dim idx for each idx in tab.indexes idx.code= UCase(idx.code) next' Modify the primary key name Dim key  for each key in tab.keys key.code= UCase(key.code) next next' Treat views in the same way' Dim view' for each view in folder.Views' if not view.isShortcut then ' view.code = view.name' end if' next' go span> into the sub-packages Dim f ' running folder For Each f In folder. Packages if not f.IsShortcut then ProcessFolder f end if Next end sub

Leave a Comment

Your email address will not be published.