Hi!
I'm trying to use the functions to dimension a skecth, but it always gives me the wrong result. In this case i'm using a smart dimension of 629mm dived by 17.813mm. the result should be 35.311mm, but it gives me 34mm every single time...
I'm trying to do a parametric guitar fretboard and need accurate results for each fret.
What I'm I doing wrong?
Smart dimension gives wrong result
Smart dimension gives wrong result
Don't know what the \ is doing.
Re: Smart dimension gives wrong result
Don't know what the \ is doing.
Re: Smart dimension gives wrong result
yep, that does it!!
Thank you very much!!
Don't know how what I was thinking...
Thank you very much!!
Don't know how what I was thinking...
Re: Smart dimension gives wrong result
The backslash operator is actually VBA and is used for integer division. I'm a little surprised the equation editor accepts it...
https://learn.microsoft.com/en-us/offic ... h-operator
https://learn.microsoft.com/en-us/offic ... h-operator
Re: Smart dimension gives wrong result
That's interesting. Going a bit off thread but seeing how the \ operator is interpreted got me thinking.josh wrote: ↑Wed Jun 28, 2023 10:09 am The backslash operator is actually VBA and is used for integer division. I'm a little surprised the equation editor accepts it...
https://learn.microsoft.com/en-us/offic ... h-operator
does % work?
ok how about this?
ok, this maybe?
That's interesting...
Re: Smart dimension gives wrong result
SolidWorks actually uses VBA to evaluate equations. I notice you are trying to use MOD…. You’re using Excel syntax, which won’t work. Any VBA works. However, for some reason (probably trying to protect users from themselves), the syntax checker that watches what you’re typing will only accept certain VBA. If you can manage to bypass the syntax checker, you can get Equations to execute whatever VBA you want. One way to do this is to hide your VBA in a custom property.
If you try to make a global variable equal to =8 mod 3, the equation syntax checker won’t let you. However, if you create a custom property, say, “test” and make its value “8 mod 3” (note the “=” sign is not there), you can then go to the equation interface and make your global variable equation =”test”. The syntax checker will recognize that “test” is linked to a custom property, but it will not check the property text for syntax. After syntax check, it will replace the custom property name with its value and then hand that to VBA for evaluation and you’ll get a result of 2.
If you try to make a global variable equal to =8 mod 3, the equation syntax checker won’t let you. However, if you create a custom property, say, “test” and make its value “8 mod 3” (note the “=” sign is not there), you can then go to the equation interface and make your global variable equation =”test”. The syntax checker will recognize that “test” is linked to a custom property, but it will not check the property text for syntax. After syntax check, it will replace the custom property name with its value and then hand that to VBA for evaluation and you’ll get a result of 2.