1 PowerDesigner中批量根据对象的name生成comment的脚本
执行方法:Open PDM -- Tools -- Execute Commands -- Run Script
Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl 'the current model 'get the current active model 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 'This routine copy name into code for each table, each column and each view 'of the current folder Private sub ProcessFolder(folder) Dim Tab 'running table for each Tab in folder.tables if not tab.isShortcut then tab.comment = tab.name Dim col 'running column for each col in tab.columns col.comment= col.name next end if next Dim view 'running view for each view in folder.Views if not view.isShortcut then view.comment = view.name end if next 'go 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
2 PowerDesigner中逆向工程将数据库中comment脚本赋值到PDM的name
执行方法:Open PDM -- Tools -- Execute Commands -- Run Script
Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl 'the current model 'get the current active model 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 'This routine copy name into code for each table, each column and each view 'of the current folder Private sub ProcessFolder(folder) Dim Tab 'running table for each Tab in folder.tables if not tab.isShortcut then if len(tab.comment) <> 0 then tab.name = tab.comment end if On Error Resume Next Dim col 'running column for each col in tab.columns if len(col.comment) <>0 then col.name =col.comment end if On Error Resume Next next end if next end sub
相关推荐
为了解决这个问题,可以利用PowerDesigner的内置功能和自定义脚本来实现NAME与COMMENT之间的自动转换。 首先,我们可以使用一个VBA(Visual Basic for Applications)脚本来将NAME中的字符复制到COMMENT中。这段...
在PowerDesigner这款数据建模和设计工具中,name和comment的互换是一个重要的操作,尤其对于数据模型的管理和维护来说。当我们处理复杂的数据模型时,我们可能需要将模型中对象的name(名称)和comment(注释)字段...
"PowerDesigner 中name和comment 互换脚本"这个主题涉及到的是在PDM中,如何通过编写VBS(Visual Basic Script)脚本来实现模型对象的name属性和comment属性的交换。 PowerDesigner中的name属性通常用于定义对象的...
标题“powerdesigner_comment转name_name转comment”指的是使用PowerDesigner工具进行数据库设计时,将字段注释(comment)与字段名(name)之间进行互相转换的功能。在数据库设计过程中,注释对于理解和维护数据库...
这个脚本的作用是将Comment中的字符COPY至Name中。 Step2:然后执行下列脚本: ```vb Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl ' the current model ' get the current active...
在PowerDesigner中,可以通过执行脚本来自动化一些重复性任务,例如将字段的名称(Name)自动填充到其注释(Comment)中。以下是对这个过程的详细解释: 首先,打开PowerDesigner,点击菜单栏上的“Tools”(工具)...
同时,我们也了解了 PowerDesigner 中的 Name 与 Code 的概念和区别。 这篇文章旨在帮助读者更好地理解 PowerDesigner 中的 Name 与 Code 同步问题,并提供了解决该问题的方法。如果您在使用 PowerDesigner 时遇到...
标题中的“PowerDesigner 把name写到Comment中 和 把Comment写到name中 pd7以后版本可用”指的是一项在PowerDesigner中操作模型属性的方法。PowerDesigner是一款强大的数据建模工具,广泛应用于数据库设计和逆向工程...
2. 数据建模:PowerDesigner12.5提供了数据建模的功能,能够帮助企业快速设计和构建数据库,实现数据的一致性和可靠性。 3. UML 对象建模:PowerDesigner12.5支持 UML 对象建模,能够帮助企业快速设计和构建应用...
描述文件"将Comment中的字符COPY至Name中.vbs"表明这是一个VBScript脚本,用于自动化这个过程。 VBScript是Visual Basic Scripting Edition的缩写,是一种轻量级的脚本语言,常用于Windows环境中的批处理任务。在这...
PowerDesigner中使name列的值等于comment列的值的脚本,亲测可用
在使用PowerDesigner的过程中,有时会遇到一个常见的问题,即Name(名称)与Code(代码)同步的问题。这个问题指的是当用户修改了一个实体或字段的Name时,其对应的Code也会自动更新,这可能不符合开发者的预期,...
将powerdesigner中物理模型的英文字段名称转换为显示注释
powerDesigner 把name项添加到comment 使用方法使用方法 PowerDesigner->Tools->Execute Commands->Edit/Run Scripts 可以保存该脚本为:name2comment.vbs
标题中提到的问题,即"PowerDesigner逆向工程时,将表字段的comment转换为PDM的name",可以通过编写和执行自定义脚本来实现。以下是这个过程的详细步骤: 1. 打开PowerDesigner中的PDM模型。 2. 进入"Tools"菜单,...
在本篇中,我们将探讨如何使用PowerDesigner批量生成SQL脚本来将name属性转换为数据库中字段的comment。 首先,我们需要了解PowerDesigner中的PDM(Physical Data Model),这是一个物理数据模型,它包含了数据库的...
PowerDesigner里执行脚本命令,把comment列的内容批量复制到name列。
在 PowerDesigner 中,对象的 Name 和 Comment 分别代表了对象的名称和描述,这两者对于理解和维护数据库模型非常重要。 #### 一、Name到Comment的复制 在 PowerDesigner 物理数据模型 (PDM) 中,有时候需要将对象...
标题“PowerDesigner15-将Name中的字符COPY至Comment中.vbs”指的是使用VBScript(Visual Basic Scripting Edition)编写的一个脚本,该脚本专为PowerDesigner 15设计,目的是自动将实体(Entity)或属性(Attribute...
PowerDesigner 中把Name值批量复制到Comment实用脚本,注意是在CDM和PDM中运行此脚本便可.PowerDesigner->Tools->Execute Commands->Edit/Run Scripts