Good morning, please would somebody be able to offer some advice?
I've created a pattern using iLogic, below is an example line:
Patterns.AddRectangular("Slats", "Slat 1", Number_of_Slats, Timber_Width, "", "Z Axis", columnNaturalDirection := False)
The pattern quantity and centres need to be dictated by parameters at all times, but when the code runs and creates the pattern, instead of inputting "Number_of_Slats" and "Timber_Width" into the pattern feature, it puts the calculated values in. So when the parameters are changed after the pattern creation, the pattern doesn't update.
The workaround for this in constraints is to add the values into "", so they retain their parameter value. But this does not work for patterns as the columnCount and columnOffset properties are set to Integer and Double, where as in constraints they're set to string.
Is there a way to keep the pattern values updated in line with the parameters without having to delete and re-add the pattern every time one of them changes?
Many thanks
Sean
Solved! Go to Solution.
Solved by WCrihfield. Go to Solution.
Hi @sean.boyle77X79. You may have to switch from using the iLogic 'Patterns' Rule Object method (Link1, Link2, Link3), to using the Inventor API method (OccurrencePatterns.AddRectangularPattern). You get to the OccurrencePatterns Inventor API object through AssemblyComponentDefinition.OccurrencePatterns. The Inventor API method allows either a regular numeric value, or a String for those values, but the other inputs are specified differently also, so there is a trade off.
Wesley Crihfield
(Not an Autodesk Employee)
Can't find what you're looking for? Ask the community or share your knowledge.