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: 

Parameter Linking When Creating an iLogic Pattern

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
sean.boyle77X79
171 Views, 2 Replies

Parameter Linking When Creating an iLogic Pattern

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

2 REPLIES 2
Message 2 of 3

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

EESignature

(Not an Autodesk Employee)

Message 3 of 3

This worked wonderfully, thank you 🙂

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report