• Blog posts

    Bio

    by Clint Brown

     

    I wrote a bit of code to help with finding the name of objects in Inventor and I thought I would share it with you.

    The rule is very simple, it reports the current selection set back to a message box, or  in simpler terms, it tells you what you have selected in the graphics window.

    It works in parts and assemblies, and will report on Parts and features

    The Video above shows the code in action (there is no Audio)

    The code looks like this:

    ‘---------START OF ILOGIC CODE-------------------

    'Rule to name the selection Set

    For Each oObject In ThisDoc.Document.SelectSet

    Cadline_Community_iLogic = 1

    Thing = oObject

    If TypeOf oObject Is Face Then

    Cadline_Community_iLogic = 0

    End If

    If Cadline_Community_iLogic = 1 Then

    MessageBox.Show(Thing.Name"Cadline")

    End If

    Next

    ‘---------END OF ILOGIC CODE--------------------