Hi @Mikeclarke1500 - thanks for reporting this. It turns out that the error message is misleading: the problem is not really related to memory. It's more like an "operation not supported" issue. It occurs when the rule tries to project a Spline Handle in your Boundary sketch. That is easy to work around, but the rule has other problems with a large number of occurrences in the pattern.
In Inventor 2025, you can edit a rectangular pattern and select a boundary sketch to trim it to. No iLogic rule is required.
I attached a different rule. This will work on your part in Inventor 2024. To use it, copy the attached PatternWithinBoundary.txt to one (and only one) of these locations:
- the same folder as the part
- your project workspace folder
- your External Rules Directory (as set in Tools > Options > dropdown at bottom > iLogic Configuration)
Then edit your part. Rename the Suppress_Extra_Holes rule and create a new Suppress_Extra_Holes rule with this text:
AddVbFile "PatternWithinBoundary"
Sub Main
Dim pwb As New PatternWithinBoundary(ThisDoc.Document, ThisServer)
pwb.ClipPattern("Hole2", "HolesArray", "Boundary", 0.0)
iLogicVb.DocumentUpdate
End Sub
That should work.
Note that some edges of pattern elements might cross the boundary. It's only checking the center point of each pattern element. If you want to keep them away from the boundary, you can set the value of the offset argument (which is 0.0 in the sample above).
Mike Deck
Software Developer
Autodesk, Inc.