Inventor 2021 - Detecting Helix Direction with iLogic

Inventor 2021 - Detecting Helix Direction with iLogic

max.baumann07
Enthusiast Enthusiast
178 Views
2 Replies
Message 1 of 3

Inventor 2021 - Detecting Helix Direction with iLogic

max.baumann07
Enthusiast
Enthusiast

Hi everyone,

I'm using Inventor 2021 and I’ve run into a problem where I need a logic or script that can determine the direction of a helix (spiral) in my part. I have a helix feature in my 3D model which can turn either clockwise or counterclockwise. The issue is that the direction varies, and unfortunately, the helix is difficult to see clearly in both the 3D model and the drawing view.

Currently, the workaround has been to manually add a text note on the drawing specifying the helix direction. However, this method has proven unreliable. For example, if the Z-axis is inverted, a right-hand spiral might actually appear as a left-hand spiral depending on the orientation — leading to incorrect annotations.

What I really need is an automated solution. Ideally, I’d like an iLogic rule that checks the helix direction and automatically displays the correct direction (left-hand or right-hand) as a note on the drawing.

Is something like this even possible with iLogic or any API in Inventor? And if so, how would one go about implementing it?

Thanks in advance for any advice or code examples!


This is the view in the drawing (not good).: 

 

maxbaumann07_0-1746021335658.png



Additional notice in the drawing.: 
However, the hint is error-prone and not dependent on the 3d model. One moment of carelessness and errors happen. Currently I have 6 different symbols for the spiral as a drawing template (yes, there are only right or left, but there are also different notes in the text). The most important thing is that the corresponding drawing checks in which direction the spiral goes.

maxbaumann07_1-1746021446840.png

 

 

 

 

0 Likes
179 Views
2 Replies
Replies (2)
Message 2 of 3

J-Camper
Advisor
Advisor

You should be able to do something really simple if all you need to do is pull the feature information.  Add this iLogic rule [Changing the feature name to your coil feature] and set the rule to run on the Event Trigger: "Part Geometry Change"

Dim cf As CoilFeature = Feature.InventorFeature("Coil1")
iProperties.Value("Custom", "IsAxisReversed") = cf.AxisDirectionReversed
iProperties.Value("Custom", "IsClockwise") = cf.ClockwiseRotation

 

It will create a custom iPoroperty for the two feature properties, and the event trigger will make sure the iproperties update whenever the part geometry changes.  You can then bring these iProperties into the drawing with leader notes, which provide the iProperty value.

0 Likes
Message 3 of 3

max.baumann07
Enthusiast
Enthusiast

Thank you for your input!
I’ve been working on my code over the past few days, following your suggestions, and I’ve also added some new features along the way.
Everything is now working exactly as it should!

Really appreciate the help and guidance.

0 Likes