几何尺寸与公差论坛

 找回密码
 注册
查看: 936|回复: 0

【转帖】code for showhide or delete bom qty column

[复制链接]
发表于 2009-4-13 09:46:18 | 显示全部楼层 |阅读模式
code for show/hide or delete bom qty column?
part of one of my macros resizes the bom table. i have tried to get it to add or delete the quantity column in the bom. without the api you can hide and show the qty column but can not delete it. in the api i haven't been able to find the code to hide or show it and the code to delete the columns will not delete the qty column.
i have added a sample macro that will find the bom on a sw sheet and after finding it will delete columns and change the title of a column. but it will not delete the quantity column. does anyone know the code hide and show the column?
dan miel
sw sp4
hi dan,
look at my code-sniplet which shows how i empty a column of my bom.
you also can manipulate the colums with the swtable-object (delete colum, hide column and so on)
swfeat = swmodel.firstfeature
do while not swfeat is nothing
if "bomfeat" = swfeat.gettypename then
swbomfeat = swfeat.getspecificfeature2
vtablearr = swbomfeat.gettableannotations
for each vtable in vtablearr
swtable = vtable
icol = swtable.columncount
irow = swtable.rowcount
for i = 0 to irow - 1
swtable.text(i, 3) = " "
next i
exit while
'nsplitdir = swtable.getsplitinformation(nindex, ncount, nstart, nend)
next vtable
end if
swfeat = swfeat.getnextfeature
loop
end while
hope i could help,
hg
quick
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-12-24 09:41 , Processed in 0.035191 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表