Styles Editor , sheet metal rule

Styles Editor , sheet metal rule

Anonymous
不适用
875 次查看
5 条回复
1 条消息(共 6 条)

Styles Editor , sheet metal rule

Anonymous
不适用

Hello,

I just noticed on one of the parts I created when I change sheet metal tule throug iLogic form , material style don`t change automatically to match. Please take a look at the attached part.  So if I change thickness to 5/16 on the form - Sheet metal rule changes to 5/16 and unfold rule changes but not the Material style.... I checked Styles editor and seems everything is correct there. See image.

Any help is apreciated.

Thanks!

0 个赞
已接受的解答 (1)
876 次查看
5 条回复
回复 (5)
2 条消息(共 6 条)

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

I gave a test with the iLogic form, it works well to me. I switched the thickness to different values, the active sheet style will swtich to the corresponding style, and the material is also correct. In addition, the snapshot you shared looks ok to me. The thickness is 5/16", the material is  R1687 - 5/16" HRS. Is it wrong?

0 个赞
3 条消息(共 6 条)

Anonymous
不适用

Good morning,

If you go to iProperties of the part. Physical. - in the Material field it will be R1361 - 1/4"HRS. Its suppose to change to 5/16" but it doesnt for some unknown reason.

Thank you.

0 个赞
4 条消息(共 6 条)

xiaodong_liang
Autodesk Support
Autodesk Support
已接受的解答

Hi,

 

I saw no code changes the iProperties Material after changing SheetMetal style. You will need to add some codes like below in your iLogic rule "STEP#1":

 

//....other codes.

If
ShThk = 0.313 in Then SheetMetal.SetActiveStyle("5/16"& Chr(34)) Else If ShThk = 0.25 Then SheetMetal.SetActiveStyle("1/4"& Chr(34)) Else If ShThk = 0.1345 Then SheetMetal.SetActiveStyle("10ga") Else If ShThk = 0.105 Then SheetMetal.SetActiveStyle("12ga") Else If ShThk = 0.1793 Then SheetMetal.SetActiveStyle("7ga") End If 'add these code to update iProperty doc = ThisDoc.Document oDef= doc.ComponentDefinition currentStyle = oDef.SheetMetalStyles(SheetMetal.GetActiveStyle()) MsgBox(currentStyle.Material.Name) iProperties.Material = currentStyle.Material.Name

//....other codes
0 个赞
5 条消息(共 6 条)

Anonymous
不适用

Thank you. After I added this code, Material style changes every time I change thickness!

 

Solved!

0 个赞
6 条消息(共 6 条)

Anonymous
不适用

One more question.

With this code above everything works except the color style change.

Is there any code that will update color style?

Untitled.png

 

Thank you

0 个赞