-
Re: Modify A Global Variable Value (C#)
Artem Taturevych Feb 7, 2016 9:17 PM (in response to Jason Taylor)Hi,
Make sure that you are using the correct decimal point. Try to set your param["Width"] to integer (e.g. 5) and see how it goes. What is the value inside param["Width"] and what is the type of the value?
Thanks,
Artem
-
Re: Modify A Global Variable Value (C#)
Jason Taylor Feb 7, 2016 9:33 PM (in response to Artem Taturevych)param["Width"] = 3.5 and is a string value. I left it at string because both examples I was basing off of had the full equation in doubles quotes which makes it a string and the popup tip I get in visual studio tells me that part of the SetEquationAndConfigurationOption method requires the equation in string format.
-
Re: Modify A Global Variable Value (C#)
Artem Taturevych Feb 7, 2016 9:44 PM (in response to Jason Taylor)-
Re: Modify A Global Variable Value (C#)
Jason Taylor Feb 7, 2016 10:42 PM (in response to Artem Taturevych)How did you get to that "Customize Format" dialog?
-
Re: Modify A Global Variable Value (C#)
Artem Taturevych Feb 7, 2016 10:45 PM (in response to Jason Taylor)Go to Start in the Windows then Control Panel->Region and Language
Thanks,
Artem
-
Re: Modify A Global Variable Value (C#)
Jason Taylor Feb 7, 2016 11:20 PM (in response to Artem Taturevych)My decimal format settings are correct. I'm thinking the problem may have to do with the issue referenced in these posts:
Equations broken in SW 2015 SP4
SOLIDWORKS KB3072630 Update Issues
I attempted to repair my installation and it fixed the broken equations when I reopened the part, but they "re-broke" after I edited them.
I found a workaround to updating the value of the equation, by adding a construction geometry line segment and setting the global variable equal to that dimension. Then, I just update the length of the line segment. However, this still doesn't help with the recurring syntax error I'm getting
-
-
-
-
-