当前位置: 代码迷 >> PowerDesigner >> 为何 用vbs 无效
  详细解决方案

为何 用vbs 无效

热度:5887   发布时间:2013-02-26 00:00:00.0
为什么 用vbs 无效?
我打开PD,里面有很多表。一下表需要进行批量修改。于是试验了一下VBS。但是发现无论怎么用,都不行。

以下是我的VBS脚本

Private Sub ProcessFolder(folder)
    for each table   in   ActiveModel.tables   
        if table.name = "供应商付款表" then table.comment = "aaa" '进行判断并赋值
    next 

End Sub



Private Sub ProcessFolder(folder)
    Dim Tab '定义数据表对象
    for each Tab in folder.tables
       if not tab.isShortcut then
          if tab.comment <> "aaa" then tab.name = tab.comment '进行判断并赋值
          Dim col '定义列对象
          for each col in tab.columns
             if col.comment <> "" then col.name = col.comment '进行判断并赋值
          next
       end if
    next
End Sub

类似的VBS我弄了很多。都无效。运行后表一点变化都没有。

为什么?
------解决方案--------------------------------------------------------
该回复于2012-10-17 13:33:13被版主删除
  相关解决方案