ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
WVWillem Van Opstal07/01/2016

Hi all,

I think it's really simple, but can't get it to work. Just stepped into the world of macro's.

I downloaded and edited a few examples and wish to make them work within my models. I now created a user form to change dimensions successfully.

What I can't get to work, is changing global variables. What line of codes do I have to insert?

For changing the dimensions I use a variable from the userform and the following line of code:

boolstatus=Part.Extension.SelectByID2("name@sketch@location","DIMENSION", xx,xx,xx....)

Part.Parameter("name@sketch").SystemValue = dblVariable

In this case, 'Part' is the active document.

Pretty simple and straightforward to me. Is there any simple line of code to change Global variables within the equations manager?

Thanks!