AnsweredAssumed Answered

BOM column Hide/Show API VB.NET

Question asked by Norbert Gal on May 26, 2017
Latest reply on May 29, 2017 by Norbert Gal

Hi,

 

I have a BOM table what contains hidden columns. I'd like get the title and visibility informations of all columns.

This is a sample part of my code below.

My problem is that I get empty string from GetColumnTitle and False from  ColumnHidden  when I tried to get this informations on a hidden column.

What do I wrong?

 

Dim BomFeature As SldWorks.BomFeature

Dim BomTableAnn As SldWorks.BomTableAnnotation

Dim TableAnn As SldWorks.TableAnnotation

 

'--gets the BomFeature object with help of other Function

BomFeature = GetFirstBom()

BomTableAnn = BomFeature.IGetTableAnnotations(1)

TableAnn = BomTableAnn

 

maxRow = BomTableAnn.RowCount - 1

maxCol = TableAnn.TotalColumnCount '--gets the column count even if there is hidden columns

 

For c = 0 To maxCol - 1

Debug.Print("Title: {0}", TableAnn.GetColumnTitle(c))

Debug.Print("Hidden: {0}", TableAnn.ColumnHidden(c))

Next

Outcomes