If it is VB6, your code
Dim MySolid as Acad3DSolid
MySolid = MySS.Item(0)
looks fine. I am not sure, though, in VB.NET, implicit type conversion is
still OK. Since MySS.Item(0) returns an object, if you use C#, you
definitely need to cast it into Acad3DSolid:
MySolid=(Acad3DSolid)MySS.Item[0];
So, just try this in your VB.NET:
MySolid=CType(MySS.Item(0), Acad3DSolid)
wrote in message news:4964775@discussion.autodesk.com...
I'm trying to populate textboxes in a Windows App. with properties of a
3DSolid. I got the app to open a document with the solid and I can assign
the solid to a variable - but I get an exception when I try to assign the
3DSolid's properties to variables. I can see the correct value in the Watch
window though. For instance: Assume MySS is a selection set with 1 element
being the solid.
Dim MySolid as Acad3DSolid
MySolid = MySS.Item(0)
Dim MyVolume as Double = MySolid.Volume
Last line is no good ==> Unhandled exception
"System.EngineExecutionException"
but when I break and enter MySolid.MyVolume in the Watch window - it shows
the correct value and says it's type "Double"
Could there be something wrong with my refs?
I've got AutoCad 2006 Type Library and AutoCAD/ObjectDBX Common 16.0 Type
Library referenced.
Please help - this is driving me nuts.