Need to Remove Decimal Precision from Custom Drawing Properties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
So I've created an iLogic template that controls the width of an assembly using custom parameters. BUT, volume is an important factor in our drawings, so i was able to get iLogic to retrieve the volumes of the individual foams using the following code.
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 32268 StartFragment: 314 EndFragment: 32236 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet
If Pax_Width_Center = "16.3" Then Parameter("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam.Pax_Width") = "16.3" iLogicVb.RunRule("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam", "Pax_Width") iProperties.Value("Custom", "Assembly Volume")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-Total") iProperties.Value("Custom", "Foam Volume-Ethafoam")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-Ethafoam") iProperties.Value("Custom", "Foam Volume-FPI21ST")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-FPI21ST") iProperties.Value("Custom", "Foam Volume-FPI55")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-FPI55") iLogicVb.UpdateWhenDone = True ElseIf Pax_Width_Center = "16.8" Then Parameter("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam.Pax_Width") = "16.8" iLogicVb.RunRule("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam", "Pax_Width") iProperties.Value("Custom", "Assembly Volume")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-Total") iProperties.Value("Custom", "Foam Volume-Ethafoam")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-Ethafoam") iProperties.Value("Custom", "Foam Volume-FPI21ST")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-FPI21ST") iProperties.Value("Custom", "Foam Volume-FPI55")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-FPI55") iLogicVb.UpdateWhenDone = True ElseIf Pax_Width_Center = "17.3" Then Parameter("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam.Pax_Width") = "17.3" iLogicVb.RunRule("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam", "Pax_Width") iProperties.Value("Custom", "Assembly Volume")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-Total") iProperties.Value("Custom", "Foam Volume-Ethafoam")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-Ethafoam") iProperties.Value("Custom", "Foam Volume-FPI21ST")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-FPI21ST") iProperties.Value("Custom", "Foam Volume-FPI55")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-FPI55") iLogicVb.UpdateWhenDone = True ElseIf Pax_Width_Center = "17.8" Then Parameter("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam.Pax_Width") = "17.8" iLogicVb.RunRule("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam", "Pax_Width") iProperties.Value("Custom", "Assembly Volume")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-Total") iProperties.Value("Custom", "Foam Volume-Ethafoam")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-Ethafoam") iProperties.Value("Custom", "Foam Volume-FPI21ST")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-FPI21ST") iProperties.Value("Custom", "Foam Volume-FPI55")=iProperties.Value("SPECTRUM BOTTOM CUSHION ASSEMBLY-RECONFIGURED.iam","Custom","Foam Volume-FPI55") iLogicVb.UpdateWhenDone = True End If
The code works and the iProperties were able to be imported into my notes block, but the amount of trailing decimal places is way too high; these volumes should be rounded to the nearest cubic inch. How can I get these volumes to successfully round to the nearest cubic inch, and completly eliminate the trailing decimal places from the paremeters?