CURRENT to snap - not working
-
I'm having a bit of problem using this extremely useful function. I've uploaded an example where there are boxes that copy according to length, and a beam that's length is determined by...the overall length. I've put the CURRENT function in the overall LenX as I've seen done, but it's not working as expected. Am I doing something wrong?
-
Unfortunately I don't have SU7 available right now. So I'll write it out as I use it.
LenX=round(current("LenX")/10)*10
I think that is the right syntax. The idea is that the current LenX (we'll say 12) gets divided by 10 (the number we want to snap to). The answer is 1.2. That gets rounded to 1. Then multiplied by 10. So LenX = 10 after all the math gets run.
Does that help?
Chris
BTW, there seems to be a glitch if you are working in cm. The current Lenx is always in inches, even if the model units are cm and the Dc units are cm. In the case of using cm, you need to use:
LenX=round(current("LenX")*2.54/10)*10. So if the user scales to 12 cm, the currentLenx is actually only 4.72 inches. So multiply it by 2.54 first, to convert it into cm. Then you will have 12/10 to equal 1.2. Then that gets rounded down to 1. Then multiplied up to 10cm.
I hope that helps and I hope I got the syntax right w.o su7 in front of me.
Chris
-
Thanks Chris. I'll check this out tonight.
-
Thanks Chris! That worked. Would have never had known there was an issue.
Advertisement