Page 1 of 1
one sketch dimension driven by multiple global variables
Posted: Wed Mar 27, 2024 1:35 pm
by Mike Gera
I entered (4) global variables in the attached part:
length_01 = 1.0
length_02 = 2.0
length_03 = 3.0
length_04 = 4.0
I then made (4) different configurations and attempted to link D2@Sketch1 to the 4 different global variables using the "This Configuration" setting in the dimension Modify box.
For some reason, it's not working properly. Note how, for example, "length_01" was subsequently set to "length_01". I did not do this.
What am I doing incorrectly?
Thanks for any replies.
Re: one sketch dimension driven by multiple global variables
Posted: Wed Mar 27, 2024 1:55 pm
by Glenn Schroeder
Mike Gera wrote: ↑Wed Mar 27, 2024 1:35 pm
I entered (4) global variables in the attached part:
length_01 = 1.0
length_02 = 2.0
length_03 = 3.0
length_04 = 4.0
I then made (4) different configurations and attempted to link D2@Sketch1 to the 4 different global variables using the "This Configuration" setting in the dimension Modify box.
For some reason, it's not working properly. Note how, for example, "length_01" was subsequently set to "length_01". I did not do this.
What am I doing incorrectly?
Thanks for any replies.
I suspect you made the mistake when you attempted to link to the global variable. I changed the global variables back to 1.0 and 2.0, and then it linked just fine. What method did you use to attempt to link to the global variable? I set the dimension Modify box to this configuration, cleared the value that was there, and hit the Equal symbol on my keyboard. That allowed me to select the global variable from the drop-down.
Re: one sketch dimension driven by multiple global variables
Posted: Wed Mar 27, 2024 4:22 pm
by DanPihlaja
You have to set this drop down to "This configuration" for it to work. By default it is set to "all configurations"
Re: one sketch dimension driven by multiple global variables
Posted: Wed Mar 27, 2024 4:56 pm
by Mike Gera
Please see the screen capture below.
Thanks.
Re: one sketch dimension driven by multiple global variables
Posted: Wed Mar 27, 2024 7:55 pm
by mattpeneguy
On my phone so can't really see the animation. But try not using underscores in your variable names.
About 10 years ago underscores in custom property names gave me all kinds of weird results...and it wasn't documented anywhere!
Re: one sketch dimension driven by multiple global variables
Posted: Thu Mar 28, 2024 8:17 am
by Mike Gera
I was able to get it to work both with and without underscores in the variable names.
See attached files, if interested.
I went through and eradicated everything, then systematically linked the variables via the "Equations, Global Variables, and Dimensions" window.
Setting the variables at the sketch level doesn't seem to work. I will go so far as to say there's a bug.
Re: one sketch dimension driven by multiple global variables
Posted: Thu Mar 28, 2024 9:30 am
by bnemec
I tried to copy your process and the behavior was not repeatable in 2019SP4. I was thinking maybe you had dirieved configs, but I didn't see that any were indented (treed) in the drop down menu.
I did notice some strange behavior in the global variable selector that might point to something. When you link the first GV you get all four of them. When you link to the second GV all four are still listed. When you link the third one the list only shows gv03 and gv04. It feels like something may have gone wrong when applying the second GV.
Re: one sketch dimension driven by multiple global variables
Posted: Thu Mar 28, 2024 11:53 am
by Mike Gera
I'm just now discovering that Global Variables aren't needed for what I'm trying to accomplish here. Hard values can be assigned to a dimension across multiple configurations. That seems to be reliable with no issues.
Re: one sketch dimension driven by multiple global variables
Posted: Thu Mar 28, 2024 1:48 pm
by mattpeneguy
You can also use a Design Table. You are using a previous version of SW than what I have installed. So, I can't post a file that you can open.
Seeing your original post, I thought you had a specific need to do it the way you were.
Re: one sketch dimension driven by multiple global variables
Posted: Thu Mar 28, 2024 2:39 pm
by SPerman
You are probably aware of this, but you can right click on the sketch and chose "Configure Feature" and see all of the dimensions for the configurations in one place. You can also do the same thing for the extrude feature.