I'm still pretty new - studying for the CSWP and using an online course to do so. I'm in SW 2018, and seem to have found some sort of glitch.
Last night the instructor went through global variables. Seemed very easy... he created a few global variables in "Manage Equations", made a very simple sketch which referenced those variables for a few dimensions. Extruded the sketch into a solid.
Then he went back into "Manage Equations" and edited the values of the GV's... and as soon as he clicked "ok", the model changed, as did the sketch of course. Very easy.
I recreated this model on my system and everything worked as expected until I tried editing the values of the GV's. Exit "Manage Equations"... nothing happens. Click rebuild several times... nothing happens. Open the sketch... still showing the original dimensions. Save, close, reopen the file... the "new" GV values saved and are visible in the design tree/"Manage Equations", but the model is still not updated!
The only way I could find to force it to update is to actually go into every GV linked dimension one at a time in the sketch... which seems to defeat the purpose of using GV's at all.
In "Manage Equations" I do have "Automatically rebuild" and "Automatic solve order" selected.
Any ideas?
SolidworksSketching
thank you I will try that.
Jim,
I'm not sure I agree with you. I think that it's often known before hand which sketch dimensions will be driven by global variables, so setting up the global variable ahead of time, then creating the sketch and linking the dimensions to the global variables when the dimensions are added in the sketch is an efficient workflow.
In the cases where it's not known before creating the sketch which dimensions will be linked to global variables it's simple enough to set up the global variables after closing the sketch, then edit the sketch dimensions to link them to the GV. You don't even need to open the sketch to do so; just show the dimension in the graphics area, double-click on it, and link it to the GV. Close out the Dimension dialog box, rebuild, and you're done.
Glenn
Not to hijack this thread but I think this question may help the OP as well.
It seems to me that creating GVs this way is the long way around having to create the GV then create the sketch, then link the dims. Is it possible to designate dimensions within the sketch as GVs so that you can create GVs on the fly so to speak? Prior to creating the sketch I don't know what dimensions I want to be global so I wind up creating the sketch, then creating the equations, then going back to the sketch and linking the dims. Not every efficient.
I haven't opened your file, so I can't tell if you've done this or not.
Have you set your dimension value to "=" your global variable (i.e. ="A")? When I set my dimension equal to the global variable, I get the equation symbol (capital Sigma) in front of the dimension, and the value updates when I change the global variable.
If I just type "A" (no equal sign), it changes the dimension to the global variable number, but it won't keep updating it. It's a one time change.
ETA: Nevermind... I see that your image of your equation box does show that your sketch dimensions are equal to the global variable.
Thank you for checking this out! I'm waiting to hear back from my VAR. If a reinstall is needed, perhaps it's time to move up to SW 2019?
I tried this just now, however I got the same result as before (model doesn't update).
This isn't something I anticipate using often either, but it's going to be very frustrating if it's on the CSWP exam and not working correctly. I was trying to do some sample models/problems last night for my class and the basic premise was to build a model using global variables, find the mass, then edit the variables and find the mass again. Seems like a very reasonable way to check that something was modeled correctly, but man what a pain with this not working right!
I believe you may have a corrupt install.
I opened your part and everything updates just fine.
If I check "Automatically rebuild" in the Equation Manager, it even updates the model as soon as I change any global variable value without exiting the dialog. It works just fine whether I enter a number alone or add the "mm".
I don't use global variables often, but I believe it's your addition of mm in the Value / Equation box. You don't need that since the Part is already set up to use millimeters. I removed that and just entered a value and the Part updated immediately after closing the Equations dialog box.
Try doing a force rebuild, like Steven suggested. Ctrl+Q. If something doesn't happen when I think it should, that's always my first go-to.
Other than clicking the rebuild button or pressing Ctrl+Q is there some other sort of rebuild I should be trying? I have tried both several times to no effect.
The sketch is not open/being edited.
Might need to force a re-build. Or are you still editing the sketch?
File attached. When you open the file it will be in this state:
Now say I were to change A to 100mm, the length of the box should double from 50mm to 100mm, and the thickness should increase from 10mm to 60mm.
I make the change to the GV "A" in the Equations screen and things re-evaluate correctly there:
But when i return to the model, nothing has changed, other than the values below "equations" in the design tree.
I have also reached out to our VAR to see if they have any ideas.
You can also type in the dimension box ="(whatever you want to name the global variable)", then click on the little world/global variable symbol when it pops up, and it will automatically create a new global variable for you without going into the Manage Equations window.
Melissa,
This is what I was looking for, I have tried it a couple of times and for what ever reason it hasn't worked for me so I didn't think it would work like that. I must have done something wrong. I think I was trying to type it in the name (replacing D1 @ sketch4 or something like that) so that is probably my problem. I don't recall seeing the GV symbol popping up.
Thank you
Glenn,
It is probably best to plan ahead but I don't always work that way. I often find myself thinking that a GV would be handy when in the middle of a sketch, We don't use them that much here so I don't think of them until later. One of the biggest places I could use them is in sheetmetal flanges where I create 2-4 flanges at the same time and I want the length to be fully constrained So I edit the first sketch, place the dimension and then go to edit the next sketch. The first sketch isn't showing so I have to create a new dimension rather than linking to the first.
You don't need to be in the edit mode to add global variable dimensions, all you need to do is find the sketch in the feature tree that you want your dimension/s linked to. Double click on the sketch, then edit the dimension
John,
That is the way I currently do things as well. However with my given example in sheetmetal if I am creating 3 flanges within the same feature I am actually dealing with 3 different sketches and when I switch between the sketches the dimensions are not available to be linked. Now I have to either leave the flanges not fully constrained, finish the feature, go to equations and create a GV, go back to the feature open each sketch and link to GV. Or I can just create new dimensions for each flange and hope that someone doesn't change one flange later forgetting to change the others.
- The way I do it here is type in the = sign in the dialog box and then select the dimension that I want the second dimension linked to, even if it's in another sketch..... I select the other dimensions by double clicking on a sketch in the feature tree, then all dimensions will show and all you need to do is select the proper dimension.
Global Variable would work a whole lot better if they would be a "Value" that can be used from part to part.
Correct, I am using it at work, I just don’t want to end up unlinking the licensing or anything like that. We use an outside IT support firm and they… well... let’s just say they haven’t “wowed” me in the past trying to troubleshoot other software.
So then it will create the GV and allow me to give it an inital dimension? Great, I was trying to do it in the upper box.
Thank you
99% sure you have a corrupt install...
What is it you're afraid of breaking? You mention a VAR, and your file is not the student version, so I assume you are using SW on the job... Surely you have someone at your employer that knows how to handle uninstall/reinstall?
,
type = in the field that you would normally put a number. EX: ="Sam and Dean W"
It will automatically create the GV for you. Quote marks may be ARE required for Spaces.
this is what you are looking for
Upon opening the file I am not prompted to do anything, however it does show an error in the design tree under equations:
Equation editor looks like this:
If I give "test" a value of 10mm, leave equation editor, force rebuild, and open the sketch... I find the same problem I've been having:
Waiting for my VAR to come up with the solution before I try to do anymore lessons, as the global variables seem to be used pretty heavily in the sections I'm working on now. I'll just get some more practice in modeling random items until then!
I'm running on a laptop, so it gets rebooted daily. I have a ticket in with my VAR, their initial thoughts were similar but I'm waiting to hear back from them. I'd hate to attempt a reinstall myself and break something else! I am not all that familiar with how the licensing is configured etc.
I suspect was right (he usually is) and you have a bad install. You might want to uninstall and re-install the software. If that doesn't fix it then get your VAR involved.
As I'm typing this, something occurred to me. Have you re-booted your computer since this behavior started? I get weird stuff happening when mine has been running too long.
What happens when you open this file? Are you asked to type a number?
It will be very difficult to help without the file. Can you post it here? See if you aren't familiar with the process.