Message 1 of 4
Another MDT ?

Not applicable
02-06-2000
10:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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/
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/