Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm working on a simple bit of code that will allow me to change to a predetermined sheet metal style based on the existing thickness in a file. My customer changed shops and I need to switch to the bend rads they have available. I am just running the code in each file as I open them. It works for every thickness except 12 GA. (.1046). The parameter in the document is .1046 but it doesn't pass the IF test and execute the code within. I'm sure it's something stupid but I can't find it... Any ideas?
MessageBox.Show(Parameter("Thickness"), "Param Value") If Parameter("Thickness") = .125 SheetMetal.SetActiveStyle(".125 .125 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") Else If Parameter("Thickness") = .5 SheetMetal.SetActiveStyle("1/2" & """" & " .2366 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") Else If Parameter("Thickness") = .25 SheetMetal.SetActiveStyle("1/4" & """" & " .1719 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") Else If Parameter("Thickness") = .1046 SheetMetal.SetActiveStyle("12 Ga .0781 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") Else If Parameter("Thickness") = .1345 SheetMetal.SetActiveStyle("10 Ga .125 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") Else If Parameter("Thickness") = .0747 SheetMetal.SetActiveStyle("14 Ga .0781 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") Else If Parameter("Thickness") = .1875 SheetMetal.SetActiveStyle("3/16" & """" & " .125 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") Else If Parameter("Thickness") = .375 SheetMetal.SetActiveStyle("3/8" & """" & " .1719 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") Else If Parameter("Thickness") = .3125 SheetMetal.SetActiveStyle("5/16" & """" & " .0781 Rad") MessageBox.Show(SheetMetal.GetActiveStyle, "Title") End If
RT Technologies
Autodesk Inventor 2017
Windows 10
Solved! Go to Solution.