Replace styles with ilogic

Replace styles with ilogic

J.Classens
Enthusiast Enthusiast
534 Views
3 Replies
Message 1 of 4

Replace styles with ilogic

J.Classens
Enthusiast
Enthusiast

Hello everybody,

 

I have a question about a ilogic rule i want to change.

Last year we made a change from a old to a new template. 

 

The only thing i cant get to work is to exchanged and update the style with i logic.

What i want to do is the following:

> Open style editor

JClassens_5-1651659850059.png

> Import style

JClassens_6-1651659879339.png

> Open default style

JClassens_7-1651659917049.png

> Refresh 

- PART List

- Balloons

 

Could someone help me with this. 

We use inventor 2022 so i can use:

 

https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-5C2872F6-0840-4EAA-A3C3-BECBFA011CB9

 

But the code writing i cant get to work. 

 

 

 

 

 

 

0 Likes
Accepted solutions (2)
535 Views
3 Replies
Replies (3)
Message 2 of 4

Michael.Navara
Advisor
Advisor
Accepted solution

In my opinion this workflow is not supported by API.

You can update styles in StylesLibrary and then update styles from global.

Message 3 of 4

WCrihfield
Mentor
Mentor
Accepted solution

I agree with @Michael.Navara here.  I don't think I've ever seen a way to do the 'import' step using normal iLogic code.  The rest is likely doable by iLogic, but may not be the best or most efficient option.  You should only need to do the import once, manually.  But if your template document already has it, you should not even need to do that step.  If you save that style, the object defaults style that it is used within, and the standard style that it is used within, all to the Style Library, then it/they will be available for other documents to use, once you use the Update Styles tool within the older documents.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 4 of 4

J.Classens
Enthusiast
Enthusiast

Thanks! My styles weren't save global that's why i didn't see them. 
I have saved the new style global and with a ilogic i do a update to the new styles. 
After this I will do a update from the partlist and balloons. 

 

0 Likes