zoukankan      html  css  js  c++  java
  • PowerDesigner--comment和name互相复制

    1、comment复制到name 脚本代码:

    Option Explicit
    ValidationMode = True
    InteractiveMode = im_Batch
    Dim mdl
    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
    Private sub ProcessFolder(folder)
    Dim Tab
    for each Tab in folder.tables
    if not tab.isShortcut then
    tab.name=tab.comment
    Dim col
    for each col in tab.columns
    col.name=col.comment
    next
    end if
    next
    end sub

    2、name复制到comment 脚本代码:

    Option Explicit
    ValidationMode = True
    InteractiveMode = im_Batch
    Dim mdl
    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
    Private sub ProcessFolder(folder)
    Dim Tab
    for each Tab in folder.tables
    if not tab.isShortcut then
    tab.comment=tab.name
    Dim col
    for each col in tab.columns
    col.comment=col.name
    next
    end if
    next
    end sub

    复制上述脚本,在PowerDesigner中依次点击:Tools->Execute Commands->Edit/Run Script,粘贴代码到下面的文本框,点击 Run 按钮即可实现相应的复制。
    ---------------------
    作者:agoodchild
    来源:CSDN
    原文:https://blog.csdn.net/ku_cha_cha/article/details/45603067
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    numpy.clip(a, a_min, a_max, out=None)(values < a_min are replaced with a_min, and those > a_max with a_max.)
    pytorch使用过程中遇到的一些问题
    conda管理包
    python argparse模块
    pytorch中设定使用指定的GPU
    Linux下dpkg的用法
    python pdb模块
    ubuntu SSH 连接、远程上传下载文件
    Linux中执行shell脚本命令的4种方法总结
    python linux安装anaconda
  • 原文地址:https://www.cnblogs.com/niudaxianren/p/11090895.html
Copyright © 2011-2022 走看看