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: 

Checking if hole note leader points to geometry or thread symbol

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
meGVGMF
267 Views, 2 Replies

Checking if hole note leader points to geometry or thread symbol

Hello

 

I was just wondering if anyone knew how to check whether a hole note leader was attached to the geometry of the hole/thread feature or the thread symbol.

 

From there I'd be curious to know if it would be possible to automatically move it to the other, depending on which one it's on. From what little experience I have this seems like it might be pretty complex, so I'm hoping it's actually easy or there's someone out there who knows how to do it already!

 

Thanks

2 REPLIES 2
Message 2 of 3
JelteDeJong
in reply to: meGVGMF

Checking isn't the problem. But finding the correct curve and attaching the hole note to it seems at least very difficult if not impossible.

here is the code to check if it's attached to geometry or symbol.

Dim leader As HoleThreadNote = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingDefaultFilter, "Select a hole note")
Dim drawingCurve As DrawingCurve = leader.Edge

If drawingCurve.ProjectedCurveType = Curve2dTypeEnum.kCircleCurve2d Then
    MsgBox("Hole note is attached to geometry")
Else
    MsgBox("Hole note is attached to symbol")
End If

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3
meGVGMF
in reply to: JelteDeJong

Thanks very much!

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

Post to forums  

Autodesk Design & Make Report