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: 

HOLE QTY WITH ILOGIC

1 REPLY 1
Reply
Message 1 of 2
ryan.robbins1
149 Views, 1 Reply

HOLE QTY WITH ILOGIC

I am attempting to write a piece of iLogic that will determine the quantity of holes on my part.  You will see in the screenshot below that the first hole location is hard dimensioned(won't ever change).  The last hole location must fall on the center mark which is 4" from the yellow mark.  The last variable is that the hole spacing cannot be more than 9" apart, must be equal spacing, and be as close to 9" as possible while still following all of the other rules.  

 

Inventor 2022

1 REPLY 1
Message 2 of 2
A.Acheson
in reply to: ryan.robbins1

I didn’t see a code attached for a starting point but here is the references first for part features then for hole features.


Syntax

PartComponentDefinition.Features() As PartFeatures

https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=PartComponentDefinition_Features

 

syntax

PartFeatures.HoleFeatures() As HoleFeatures

https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=PartFeatures_HoleFeatures

 

There is VBA samples also if you are wanting to try those out too. The best way to learn is to construct your own method from scratch. If you have any questions just post them up. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan

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

Post to forums  

Autodesk Design & Make Report