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: 

Change direction of thicken feature using ilogic?

2 REPLIES 2
Reply
Message 1 of 3
danmorick
971 Views, 2 Replies

Change direction of thicken feature using ilogic?

I have a skeletal model which I am controlling with ilogic.  It is a sheet metal weldment with 2 sizes.  The skeleton is a surface model, and the sheet metal parts derived from it each use a thicken feature to make solid geometry.  When I go from one size to the other (in either direction) one of the parts thickens in the opposite direction.  If I go into that part and change the direction of the thicken (e.g., positive direction to negative) everything updates and looks good.  But as soon as I change to the other size again, the thicken goes the other way.  So in other words, it seems that changing the size causes the stitched surface normal direction to flip.  I verified this by having a rule tell me the direction of the thicken:

DimthickenAsThickenFeature=ThisDoc.Document.ComponentDefinition.Features.ThickenFeatures.Item(1)
DimdirAsString
Ifthicken.Direction=20993Then
dir="Positive"
ElseIfthicken.Direction=20994Then
dir="Negative"
EndIf
MessageBox.Show(dir, "Thicken Direction")

It indicates a consistent feature direction.  I can't figure out why the surface would flip.  So I'd like to have an ilogic rule check a reference dimension against a known value to indicate whether this part thickened the wrong way, and if so, switch the feature's direction.  The problem is that I cannot find a way to edit the direction of the Thicken feature in ilogic.  Apparently thicken.Direction is read only.  Is this possible to do?

 

Thanks.

2 REPLIES 2
Message 2 of 3
danmorick
in reply to: danmorick

Update:

 

Apparently this behavior is inconsistent.  One day the model changes as intended; the next day the one part thickens incorrectly upon size change; 2 days later it's back to working as intended.

 

Even though it is currently working, I still am interested in knowing how to edit a thicken direction with ilogic, if it is possible.  I could apply it to a checking routine to correct the model in case it ever wants to behave badly again.

 

And some questions behind this whole thing for the experts: What is it that determines the normal direction of a complex stitched surface (which presumably is the reference for the positive / negative direction of a thicken feature - why "positive" means thickening the surface in this direction)?  Why would tweaking basic things like overall height / width / length make a surface flip?  Does such a surface even have a positive and a negative side?  Does Inventor choose randomly which side of a surface gets the "positive" direction of a thicken feature?

Message 3 of 3
johnster100
in reply to: danmorick

I managed to get it to change direction by changing the parameter value from positive to minus. You have to do this in ilogic or the parameter windows, it won't let you directly enter a negative value into the offset box.

 

Hope this helps,

John

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

Post to forums  

Autodesk Design & Make Report