I logic to change sheet metal rule for selected component

I logic to change sheet metal rule for selected component

didin.suryadi6JREK
Advocate Advocate
248 Views
2 Replies
Message 1 of 3

I logic to change sheet metal rule for selected component

didin.suryadi6JREK
Advocate
Advocate

HI,

 

I am looking for the code that is related to the sheet metal rule.

Basically when the rules is run the msg box like the below will come up.

for logic.JPG

0 Likes
249 Views
2 Replies
Replies (2)
Message 2 of 3

mechielvanvalen
Enthusiast
Enthusiast

What you can do is make a new user parameter in the default Sheet metal template. In the user parameters you add a multi value parameter with all the styles that you are using. It is importent that all the styles in the multi value parameter the text is equal to the Sheet Metal styles. 

mechielvanvalen_0-1656600906686.pngmechielvanvalen_1-1656600927062.png

 

After that you can add this text in a iLogic rule:

Material1 = InputListBox("Prompt", MultiValue.List("Material"), "Test", Title := "Title", ListName := "List")

SheetMetal.SetActiveStyle(Material1)

InventorVb.UpdateWhenDone = True

 

0 Likes
Message 3 of 3

didin.suryadi6JREK
Advocate
Advocate

Hi

 

Thank you for the reply.

That should work when we create the new sheet metal.

What am looking for is the i logic for old part sheet metal.

So I just want to change the sheet metal rule on the existing part.

 

Rgds

 

 

Rgd

 

 

0 Likes