Created
July 2, 2019 01:59
-
-
Save autokludge/e8c3ca945d1eec441aff0a2da65a7b53 to your computer and use it in GitHub Desktop.
Inventor ilogic - test drawing line type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Set a reference to the active document | |
Dim oDoc As Document = ThisDoc.Document | |
Dim oSelectSet As SelectSet = oDoc.SelectSet | |
'Are things selected? | |
If oSelectSet.Count < 1 Then | |
MsgBox("Select drawing line first", MsgBoxStyle.OkOnly, "Error") | |
Return | |
End If | |
If oSelectSet.Count > 1 Then | |
MsgBox("Only showing info for 1st selected item.", MsgBoxStyle.OkOnly, "Alert") | |
End If | |
For Each selection As Object In oSelectSet | |
Dim selType As ObjectTypeEnum = CType(selection.Type, ObjectTypeEnum) | |
If TypeOf selection Is DrawingCurveSegment Then | |
Dim dcs As DrawingCurveSegment = selection | |
MsgBox("Selected Curve - " & dcs.GeometryType.ToString, MsgBoxStyle.OkOnly, "Selected Curve") | |
Else | |
MsgBox("Selected - " & selType.ToString, MsgBoxStyle.OkOnly, "Selected Object") | |
End If | |
return | |
Next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment