HOLE QTY WITH ILOGIC

HOLE QTY WITH ILOGIC

ryan.robbins1
Explorer Explorer
203 Views
1 Reply
Message 1 of 2

HOLE QTY WITH ILOGIC

ryan.robbins1
Explorer
Explorer

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

0 Likes
204 Views
1 Reply
Reply (1)
Message 2 of 2

A.Acheson
Mentor
Mentor

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
0 Likes