Ilogic Sheet Metal Active Style

Ilogic Sheet Metal Active Style

filippo.costantin3HZMT
Advocate Advocate
1,715 Views
6 Replies
Message 1 of 7

Ilogic Sheet Metal Active Style

filippo.costantin3HZMT
Advocate
Advocate

Hi everyone, 

 

I modeled a Sheet Metal Part. I want to change the sheet metal default with ilogic, but when I run this simple rule it show me that error:

SheetMetal.SetActiveStyle("Acciaio INOX 10/10")

2.PNG

1.PNG

I try to use that rule in new part and it run correctly. 

Where am I wandering?

 

0 Likes
Accepted solutions (1)
1,716 Views
6 Replies
Replies (6)
Message 2 of 7

yan.gauthier
Advocate
Advocate

You can set a SheetMetalStyle by using SheetMetalStyle.Activate method (exemple is un VBA)

 

For Each oSheetMetalStyle In oSheetMetalDef.SheetMetalStyles
        If 'Some condition' Then
            oSheetMetalStyle.Activate
            'Ensure the right unfold rule is in use'
            oSheetMetalDef.UseSheetMetalStyleUnfoldMethod = True 
            Exit For
        End If
Next oSheetMetalStyle

 

oSheetMetalDef is the part's componentDefinition as SheetMetalComponentDefinition

0 Likes
Message 3 of 7

WCrihfield
Mentor
Mentor

Within screen capture image of your Styles and Standards Editor's dialog box, I noticed that in the upper right corner it is set to All Styles.  If you change this to local styles, is that sheet metal rule still available in the list on the left?  If not, you may need to copy if from the library storage to your local document, before it will let you assign it to a model.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 4 of 7

filippo.costantin3HZMT
Advocate
Advocate

Hi, 

 

I Check it. In Local style I haven't all the sheet metal styles but only one. But if I use the rule for change the sheet metal style in a standard simple part (that has one local style) it change the style correctly. 

I'll try to add to local style all the single style and I hope it will run.

0 Likes
Message 5 of 7

filippo.costantin3HZMT
Advocate
Advocate

I try to add the sheet metal rules to Local style but the rules give me the same error of first message. 

 

0 Likes
Message 6 of 7

filippo.costantin3HZMT
Advocate
Advocate

I found my problem. It has been the workpoint in the model part. In fact I place a mode point on every hook on my panel, like a picure.

1.PNG

When I modify the height of the panel change the number of hooks. If there are all the hook of workpoints then I can change the sheet metal rule with iLogic, else if the number of hooks  is less than number of workponits then I can't change the sheet metal rule.

2.PNG

 

 

0 Likes
Message 7 of 7

Accepted solution

Hi everyone, 

I found the solution about my problem. I created a rule that fixed the workpoints based on number of hooks. With that trick I can change the sheet metal rules in ilogic.

0 Likes