读书人

为何 用vbs 无效

发布时间: 2013-01-01 14:04:19 作者: rapoo

为什么 用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被版主删除

读书人网 >PowerDesigner

热点推荐