how to judge the seleted object type

how to judge the seleted object type

Anonymous
Not applicable
339 Views
2 Replies
Message 1 of 3

how to judge the seleted object type

Anonymous
Not applicable
I use Vc to program based on inventor's api.
and got a DIspatch pointer from the function:

FindUsingRay, and select it into selectset but now I do not know this object type. anyone can tell me how to get this object's type? Your answer will be very appreciated, thank you.
0 Likes
340 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
if object.Type = KHoleFeature (anything else as ObjectTypeEnum ) then
....
end if
0 Likes
Message 3 of 3

Anonymous
Not applicable
The code in the previous post will work. It relies on the fact that the
Inventor objects support the Type property which returns a value indicating
the object type. Another more generic way is to use the TypeOf statement in
VB. This allows you to compare any objects, not just Inventor objects.

If TypeOf oObject is HoleFeature Then
...
End If
--
Brian Ekins
Autodesk Inventor API


wrote in message news:5166863@discussion.autodesk.com...
if object.Type = KHoleFeature (anything else as ObjectTypeEnum ) then
....
end if
0 Likes