Another MDT ?

Another MDT ?

Anonymous
Not applicable
119 Views
3 Replies
Message 1 of 4

Another MDT ?

Anonymous
Not applicable
What am I doing wrong with this. It stops on the bomcol =
bomstand.GetColumn(I) line with a Object not set message.

Public Sub columnstuff()
Dim mcad As McadApplication
Dim util As McadUtility
Dim symbb As McadSymbolBBMgr
Dim bomstand As McadBOMStandard
Dim stringval As String
Set mcad =
ThisDrawing.Application.GetInterfaceObject("Mcad.Application")
Set util = mcad.ActiveDocument.Utility
Set symbb =
ThisDrawing.Application.GetInterfaceObject("SymBBAuto.McadSymbolBB
Mgr")
Set bomstand = symbb.StandardMgr.CurrentStandard.BOMStandard

Dim bomcol As McadColumnDefinition
'get count of columun count in Bomstandard
For I = 1 To bomstand.Columns.Count
bomcol = bomstand.GetColumn(I)
stringval = bomcol.Caption
Debug.Print stringval
stringval = bomcol.DataAlignment
Debug.Print stringval
Next
End Sub

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/
0 Likes
120 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Precede the statement with "Set"

Joe Sutphin
Author of "AutoCAD 2000 VBA Programmers Reference"
ISBN #1861002564

Checkout Sources - The magazine dedicated to AutoCAD customization
http://vbdesign.hypermart.net/sources/

Kent Keller wrote in message
news:87ln3t$ede6@adesknews2.autodesk.com...
> What am I doing wrong with this. It stops on the bomcol =
> bomstand.GetColumn(I) line with a Object not set message.
>
> Public Sub columnstuff()
> Dim mcad As McadApplication
> Dim util As McadUtility
> Dim symbb As McadSymbolBBMgr
> Dim bomstand As McadBOMStandard
> Dim stringval As String
> Set mcad =
> ThisDrawing.Application.GetInterfaceObject("Mcad.Application")
> Set util = mcad.ActiveDocument.Utility
> Set symbb =
> ThisDrawing.Application.GetInterfaceObject("SymBBAuto.McadSymbolBB
> Mgr")
> Set bomstand = symbb.StandardMgr.CurrentStandard.BOMStandard
>
> Dim bomcol As McadColumnDefinition
> 'get count of columun count in Bomstandard
> For I = 1 To bomstand.Columns.Count
> bomcol = bomstand.GetColumn(I)
> stringval = bomcol.Caption
> Debug.Print stringval
> stringval = bomcol.DataAlignment
> Debug.Print stringval
> Next
> End Sub
>
>
> --
> Kent Keller
> Check out the Mechanical Desktop FAQ @
> http://webhome.idirect.com/~dfulford/
>
>
>
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thanks Joe

I hate it when the error message tells me exactly what is wrong,
and I am not smart enough to do what it says

--
Kent Keller
Check out the Mechanical Desktop FAQ @
http://webhome.idirect.com/~dfulford/

"Joe Sutphin" wrote in message
news:87meaa$eec19@adesknews2.autodesk.com...
> Precede the statement with "Set"
>
> Joe Sutphin
> Author of "AutoCAD 2000 VBA Programmers Reference"
> ISBN #1861002564
>
> Checkout Sources - The magazine dedicated to AutoCAD
customization
> http://vbdesign.hypermart.net/sources/
>
> Kent Keller wrote in message
> news:87ln3t$ede6@adesknews2.autodesk.com...
> > What am I doing wrong with this. It stops on the bomcol =
> > bomstand.GetColumn(I) line with a Object not set message.
0 Likes
Message 4 of 4

Anonymous
Not applicable
Some days are diamonds -- some days are stone . . .

Joe

Kent Keller wrote in message
news:87mmv0$i363@adesknews2.autodesk.com...
>
> Thanks Joe
>
> I hate it when the error message tells me exactly what is wrong,
> and I am not smart enough to do what it says
>
> --
> Kent Keller
> Check out the Mechanical Desktop FAQ @
> http://webhome.idirect.com/~dfulford/
>
> "Joe Sutphin" wrote in message
> news:87meaa$eec19@adesknews2.autodesk.com...
> > Precede the statement with "Set"
> >
> > Joe Sutphin
> > Author of "AutoCAD 2000 VBA Programmers Reference"
> > ISBN #1861002564
> >
> > Checkout Sources - The magazine dedicated to AutoCAD
> customization
> > http://vbdesign.hypermart.net/sources/
> >
> > Kent Keller wrote in message
> > news:87ln3t$ede6@adesknews2.autodesk.com...
> > > What am I doing wrong with this. It stops on the bomcol =
> > > bomstand.GetColumn(I) line with a Object not set message.
>
>
>
0 Likes