Here is an issue that can be faced by C++ programmers when dealing with the Inventor API:
When I call GetGeometryOne(), I get an IDispatch interface back. but i am unable to identify the object type since DispatchUtils::GetObjectType() fails for these obects. What object types can be returned and how can I get at them?
Solution
Currently, the complete list of possible results from the Geometry properties on any assembly constraints is limited to the following object types.
Point ( IRxPoint )
Line ( IRxLine )
Circle ( IRxCircle )
EllipseFull ( IRxEllipseFull )
Vector ( IRxVector )
Plane ( IRxPlane )
Cylinder ( IRxCylinder )
Cone ( IRxCone )
EllipticalCone ( IRxEllipticalCone )
Sphere ( IRxSphere )
Torus ( IRxTorus )
BSplineSurface ( IRxBSplineSurface )
For each constraint type, the list is of course, likely to be much smaller.
Since these objects are not strongly typed objects, the only way to deal with this is to just QI for the types you expect in a cascading QI if/else if

Leave a Reply