|
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 |
|