iLogic to Apply Multiple Drawing Styles Based on User Parameter (Dimensions, GD&T, Leaders, Datums)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Inventor Community,
I'm working on creating an iLogic rule in Inventor drawing environment that can automatically apply multiple drawing styles based on a user parameter value.
What I want to achieve:
I've created a user parameter named "Type" with values "a" and "b". I want to:
When "Type" parameter = "a": Apply drawing styles
Dimension style: "dim_a"
Geometric tolerance style: "ge_a"
Leader style: "le_a"
Datum style: "da_a"
When "Type" parameter = "b": Apply drawing styles
Dimension style: "dim_b"
Geometric tolerance style: "ge_b"
Leader style: "le_b"
Datum style: "da_b"
Current situation:
I have a working iLogic rule called "Dim_change" (please refer to the attached IDW file) that successfully changes dimension styles based on the user parameter. However, this rule only handles dimension styles. I want to extend it to also apply:
Leader text styles
Geometric tolerance (GD&T) styles
Datum styles
What I need help with:
How to programmatically access and change geometric tolerance styles in existing drawings
How to apply leader styles to leader text objects (especially for sketchedSymbol objects)
How to change datum identifier styles
Proper collection iteration methods for these different drawing elements
Sample structure I'm aiming for:
All the required styles ("dim_a", "dim_b", "ge_a", "ge_b", etc.) are already created in the drawing style manager
The "Dim_change" rule in the attached IDW file shows the working dimension style change logic
I need this to work with existing drawing elements, not just newly created ones
If anyone could help me extend the dimension style changing logic to include geometric tolerances, leaders, and datums, I would greatly appreciate it!
Environment:
Inventor [Your Version]
Drawing Environment
iLogic Rules
Thank you in advance for your assistance!
Attachments: sample.idw (with "Dim_change" rule for reference)