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!
Solved! Go to Solution.
Solved by xiaodong_liang. Go to Solution.
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?
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.
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
Thank you. After I added this code, Material style changes every time I change thickness!
Solved!
One more question.
With this code above everything works except the color style change.
Is there any code that will update color style?
Thank you