Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Find Object Type of Transient Geometry Objects

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
498 Views, 2 Replies

Find Object Type of Transient Geometry Objects

I have an ObjectCollection object that contains a bunch of transient geometry (mostly Cirle2d's and LineSegment2d's).  I'm looping through it and performing operations on each object.  There are some operations that are different depending on whether the object is a circle or a line.  Is there a way to check which type of 2d geometry the object is?  Most objects have a "Type" property, but these don't, which is very frustrating.

2 REPLIES 2
Message 2 of 3
LukeDavenport
in reply to: Anonymous

Hi Odeyoe,

I think you can do this (although I haven't tested it). Does that work?

Luke

 

For Each O In OBJ
      Dim testType As String = TypeName(O)
      Select Case testType
             Case "LineSegment2d"
                    MsgBox("Line Segment")
             Case "Circle2d"
                    MsgBox("Circle")
       End Select
Next
Message 3 of 3
Anonymous
in reply to: LukeDavenport

This appears to be working.  Thank you!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report