sketch dimensions and configurations

Use this space to ask how to do whatever you're trying to use SolidWorks to do.
User avatar
bnemec
Posts: 1941
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2540
x 1398

sketch dimensions and configurations

Unread post by bnemec »

Is it possible to have sketch dimension in one config based on the that dimension in another config? So in Default the value is typed in, but in other config it's the value from Default * 2 or something. I'm thinking I cannot do it this way because there is no @[configname] in the Dimension ID, only D1@Sketch1. In equation editor with the second config active it might look like D1@sketch1@Other = D1@Sketch1@Default * 2

Another way about it would be to only have the dimension in Default config and have a different dimension "D2@sketch1" in the other config. But I cannot see a way to do that either.

In the equation editor the dimension is set to "This Cionfiguration".

The point is to have the Default config drive a secondary config and when the Default needs changed the user simply edits the dimension in Default config sketch and doesn't touch the other config.

Thanks.
by jcapriotti » Thu May 25, 2023 6:16 pm
If you make any number of dimensions "equal" to a Global variable, you can change the dimension value from any of the dimensions or the global variable, change one changes all.

If you make one dimension equal to another dimension, only the parent dimension can be changed unless you toggle the equation view to value. Then does the same as above.

There is the last option called Link Dimension" which is somewhat similar to global variables and behaves like making dimensions "equal" to a global variable. They intended to remove the option when global variable were introduced but during our beta testing, it broke the way our parametric factory automated models worked with linked dimensions. Admittingly, we used linked dimensions in a somewhat unorthodox way as a workaround. It would've required us to re-work quite a bit of models and if recall at the time, the new "Global Variables" couldn't be "configured"......that came in a later release. I'll take some of the blame as it probably made the whole thing a bit wonky and less clean than it could've been.......sorry @bnemec ()
Go to full post
User avatar
DennisD
Posts: 705
Joined: Fri Mar 12, 2021 10:04 am
Answers: 1
Location: Near Jacksonville, FL
x 1028
x 1467

Re: sketch dimensions and configurations

Unread post by DennisD »

You have multiple configurations. Use a Design Table and set the value for that dimension in the second dimension to be =2*(Cell containing the Default dim value).

I prefer to use Design Tables because it is easy to see all the values and equations and to take advantage of the power of Excel.
Brick walls are there for a reason. The brick walls aren't there to keep us out. The brick walls are there to show us how badly we want things.
- - -Randy Pausch
ellundo
Posts: 23
Joined: Tue Mar 30, 2021 7:08 am
Answers: 0
x 18

Re: sketch dimensions and configurations

Unread post by ellundo »

I do it this way as shown in the pictures. Change the state of the dimension with the menu to the right of the dimension text highlighted in blue. Top pictures is set to be unique to the configuration. Bottom is set to be the same in all configurations.
Is this what you are looking for?
Attachments
this configuration.JPG
for all configurations.JPG
User avatar
bnemec
Posts: 1941
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2540
x 1398

Re: sketch dimensions and configurations

Unread post by bnemec »

Thanks for the help, but we just want one one config driven from the Default config. The users should only be changing width and length in the sketch in the Default config, the other config should update on rebuild. The user shouldn't even activate the other config or open the equation editor. Yes, I'm using the "rebuild on save" mark for the other config.

@DennisD
We've had a couple users make design tables and they get hashed by other users. Yes, I know, it's a training thing but there are already so many variables other things we deal with causing user overload that we need to keep it simple as possible. Also, there's no need to see all the values. The user is concerned only with the nominal they enter in sketch dimension in the Default config. They shouldn't be touching anything in the other config.
edit: Trying design table option now. I was hoping to avoid embedded spread sheet for this rather simple task. But hopefully it behaves. We've had errors in the past embedding excel in Solid Edge that we think was version update/inconsistencies between CAD and excel. But, giving it a try now.



I should point out, incase it's not obvious, I don't understand all the natures of Global Variables. They behave differently than I'm used to in other systems. I've been trial and errorinig around with SW behaviors skinning the cat in various methods.

Here's one attempt that seems to work.
- create Global variable named "bracketWidth" set to 12
- in Default config set D1@Sketch1 = "bracketWidth"
- in other config set D1@Sketch1 = "bracketWidth" * .94
All works as expected, Default config has 12" wide and other config is 11.28 wide.

Next is we will need to edit the width or copy part to new file and edit it there for similar but different part (note, we are NOT using configurations for different part numbers, only one part number per file for us.)

I was @$$-u-me-ing that the D1@Sketch1 in Default config would not be editable as it's driven from equation. But I could change it to 13 when editing the sketch. Just double click dimension and type. The text box did not hint at the dimension being driven by equation with the the ="bracketWidth", it just said 12. I thought OK, but assumed it just changed from equation driven to literal 13. But it didn't, SW was kind enough to maintain the equation and update the global variable to what I typed in to the dimension value. Ok so equations are bidirectional? Not really, when I activate the other config and edit the sketch and double click the dimension it shows the equation.
So SW treats a simple "equal to" differently than when there is arithmetic operator(s)? This actually does pretty much what I was trying. BUT, is this this behavior consistent or am I hanging my hat on a glitch?
Shaun
Posts: 12
Joined: Wed Apr 14, 2021 10:35 am
Answers: 2
x 30
x 6

Re: sketch dimensions and configurations

Unread post by Shaun »

Hi Ben,

See if the file attached works (Solidworks 2019).

I have set the global length (D1@Sketch1) equal to "a", then have added lengths on to a in configs 1 and 2.

You can then edit Sketch1 in the default config only (doesn't work if you edit it in the other configs) to change the global length and the other configs should update.

image.png
image.png
Attachments
Part1.SLDPRT
(121.15 KiB) Downloaded 90 times
TTevolve
Posts: 252
Joined: Wed Jan 05, 2022 10:15 am
Answers: 3
x 84
x 159

Re: sketch dimensions and configurations

Unread post by TTevolve »

I would use the design table because of what Dennis said above, it's way easier to see what equations in the excel table vs having to go to different tabs on the equations sheet. I use design tables all the time in parts with configurations to create custom properties for those parts, way easier to edit them there and have them consistent then having to change to the tabs on the drop down lists.
User avatar
bnemec
Posts: 1941
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2540
x 1398

Re: sketch dimensions and configurations

Unread post by bnemec »

TTevolve wrote: Thu May 25, 2023 7:49 am I would use the design table because of what Dennis said above, it's way easier to see what equations in the excel table vs having to go to different tabs on the equations sheet. I use design tables all the time in parts with configurations to create custom properties for those parts, way easier to edit them there and have them consistent then having to change to the tabs on the drop down lists.
I've tried the excel table. When I edit the dimension in Default config and rebuild, the dimension in the other config does not update. I tried ctrl+Q, ctrl+B, rebuild all configs... the only thing that will update the other config after the Default config is changed is opening the design table. Is there a way to get the other config to update?

The whole point is the users shouldn't see the design table. They should not be concerned with any of the equations or going into any tabs in the equations sheet.
User avatar
gupta9665
Posts: 405
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 426
x 445

Re: sketch dimensions and configurations

Unread post by gupta9665 »

bnemec wrote: Wed May 24, 2023 3:49 pm Is it possible to have sketch dimension in one config based on the that dimension in another config? So in Default the value is typed in, but in other config it's the value from Default * 2 or something. I'm thinking I cannot do it this way because there is no @[configname] in the Dimension ID, only D1@Sketch1. In equation editor with the second config active it might look like D1@sketch1@Other = D1@Sketch1@Default * 2
How many dimensions you need to configure? If just few, then make a base sketch with desired dimensions (do not use this sketch for creating any feature) and then based your features sketches by giving offset dimension from this base sketch. For default config you can use 0 and for other you can add additional value.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
bnemec
Posts: 1941
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2540
x 1398

Re: sketch dimensions and configurations

Unread post by bnemec »

gupta9665 wrote: Thu May 25, 2023 1:18 pm How many dimensions you need to configure? If just few, then make a base sketch with desired dimensions (do not use this sketch for creating any feature) and then based your features sketches by giving offset dimension from this base sketch. For default config you can use 0 and for other you can add additional value.
One dimension changes. Just one. I like using base sketch or two that do not create a feature, rather they drive the sketches that features use. In this case the other config will always be calculated from user input on that one dimension on the Default config and a few constants that should never be changed.
User avatar
DennisD
Posts: 705
Joined: Fri Mar 12, 2021 10:04 am
Answers: 1
Location: Near Jacksonville, FL
x 1028
x 1467

Re: sketch dimensions and configurations

Unread post by DennisD »

bnemec wrote: Thu May 25, 2023 2:09 pm There are 11 kinds of people in the world, those who count in binary and those who do not.
FIFY
Brick walls are there for a reason. The brick walls aren't there to keep us out. The brick walls are there to show us how badly we want things.
- - -Randy Pausch
User avatar
bnemec
Posts: 1941
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2540
x 1398

Re: sketch dimensions and configurations

Unread post by bnemec »

DennisD wrote: Thu May 25, 2023 2:22 pmFIFY
And the third kind? Or is that the trick?
User avatar
Frederick_Law
Posts: 1944
Joined: Mon Mar 08, 2021 1:09 pm
Answers: 8
Location: Toronto
x 1634
x 1466

Re: sketch dimensions and configurations

Unread post by Frederick_Law »

bnemec wrote: Wed May 24, 2023 4:30 pm
Here's one attempt that seems to work.
- create Global variable named "bracketWidth" set to 12
- in Default config set D1@Sketch1 = "bracketWidth"
- in other config set D1@Sketch1 = "bracketWidth" * .94
All works as expected, Default config has 12" wide and other config is 11.28 wide.

Next is we will need to edit the width or copy part to new file and edit it there for similar but different part (note, we are NOT using configurations for different part numbers, only one part number per file for us.)

I was @$$-u-me-ing that the D1@Sketch1 in Default config would not be editable as it's driven from equation. But I could change it to 13 when editing the sketch. Just double click dimension and type. The text box did not hint at the dimension being driven by equation with the the ="bracketWidth", it just said 12. I thought OK, but assumed it just changed from equation driven to literal 13. But it didn't, SW was kind enough to maintain the equation and update the global variable to what I typed in to the dimension value. Ok so equations are bidirectional? Not really, when I activate the other config and edit the sketch and double click the dimension it shows the equation.
So SW treats a simple "equal to" differently than when there is arithmetic operator(s)? This actually does pretty much what I was trying. BUT, is this this behavior consistent or am I hanging my hat on a glitch?
Interesting.
So if a variable (D1) is equal to another (bracketWidth), SW will treat them as one?

This should work as long as you only change bracketWidth and not D1.
To avoid the "back" change, do bracketWidth * 1.
Or bracketWidth * Scale.
Don't remember if SW can add non-Global variable.
User avatar
jcapriotti
Posts: 1852
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1196
x 1984

Re: sketch dimensions and configurations

Unread post by jcapriotti »

If you make any number of dimensions "equal" to a Global variable, you can change the dimension value from any of the dimensions or the global variable, change one changes all.

If you make one dimension equal to another dimension, only the parent dimension can be changed unless you toggle the equation view to value. Then does the same as above.

There is the last option called Link Dimension" which is somewhat similar to global variables and behaves like making dimensions "equal" to a global variable. They intended to remove the option when global variable were introduced but during our beta testing, it broke the way our parametric factory automated models worked with linked dimensions. Admittingly, we used linked dimensions in a somewhat unorthodox way as a workaround. It would've required us to re-work quite a bit of models and if recall at the time, the new "Global Variables" couldn't be "configured"......that came in a later release. I'll take some of the blame as it probably made the whole thing a bit wonky and less clean than it could've been.......sorry @bnemec ()
Jason
User avatar
SPerman
Posts: 2035
Joined: Wed Mar 17, 2021 4:24 pm
Answers: 14
x 2207
x 1860
Contact:

Re: sketch dimensions and configurations

Unread post by SPerman »

I've always wondered why there were so many different ways to create relationships between variables.
-
I may not have gone where I intended to go, but I think I have ended up where I needed to be. -Douglas Adams
User avatar
bnemec
Posts: 1941
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2540
x 1398

Re: sketch dimensions and configurations

Unread post by bnemec »

Is there a way to get the design table to recalculate/update without opening it?
User avatar
jcapriotti
Posts: 1852
Joined: Wed Mar 10, 2021 6:39 pm
Answers: 29
Location: The south
x 1196
x 1984

Re: sketch dimensions and configurations

Unread post by jcapriotti »

bnemec wrote: Mon Jun 12, 2023 2:28 pm Is there a way to get the design table to recalculate/update without opening it?
Not that I'm aware of. You may find some macros / code that does it automatically but it's still an operation that has to open the embedded Excel file and close it. I only use DT for well defined family parts. If the design is parametrically calculated, we use equations since they are runtime updated.
Jason
User avatar
DennisD
Posts: 705
Joined: Fri Mar 12, 2021 10:04 am
Answers: 1
Location: Near Jacksonville, FL
x 1028
x 1467

Re: sketch dimensions and configurations

Unread post by DennisD »

bnemec wrote: Mon Jun 12, 2023 2:28 pm Is there a way to get the design table to recalculate/update without opening it?
If you do a forced regeneration of all the configurations it will update the DT, or rather update the configurations from the DT information.
Brick walls are there for a reason. The brick walls aren't there to keep us out. The brick walls are there to show us how badly we want things.
- - -Randy Pausch
User avatar
bnemec
Posts: 1941
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2540
x 1398

Re: sketch dimensions and configurations

Unread post by bnemec »

DennisD wrote: Tue Jun 13, 2023 7:10 am If you do a forced regeneration of all the configurations it will update the DT, or rather update the configurations from the DT information.
Will the DT recalculate or just rebuild the configs based on current values in DT? From what I saw it does not recalculate the DT on any kind of rebuild, regardless of any changes that would require the DT to recalculate.
User avatar
DennisD
Posts: 705
Joined: Fri Mar 12, 2021 10:04 am
Answers: 1
Location: Near Jacksonville, FL
x 1028
x 1467

Re: sketch dimensions and configurations

Unread post by DennisD »

bnemec wrote: Tue Jun 13, 2023 9:37 am Will the DT recalculate or just rebuild the configs based on current values in DT? From what I saw it does not recalculate the DT on any kind of rebuild, regardless of any changes that would require the DT to recalculate.
Try it and see.
Brick walls are there for a reason. The brick walls aren't there to keep us out. The brick walls are there to show us how badly we want things.
- - -Randy Pausch
User avatar
Rob
Posts: 128
Joined: Mon Mar 08, 2021 3:46 pm
Answers: 2
Location: Mighty Glossop, UK
x 787
x 208
Contact:

Re: sketch dimensions and configurations

Unread post by Rob »

We do this kind of thing quite a bit.

What we do is have some unconfigured global variables. These will be the same value for All Configs and you can edit them whilst in any configuration.

We then use configured equations for the dimensions.

An example should make it clear
image.png
image.png
I would recommend having the save mark on your configs so that they will be up to date every save
image.png
image.png (5.33 KiB) Viewed 2398 times
sergio.monti
Posts: 36
Joined: Tue May 04, 2021 2:22 am
Answers: 1
x 48
x 21

Re: sketch dimensions and configurations

Unread post by sergio.monti »

If is just the case of multiplying the dimension by a factor, you can make a fake sketch at the beginning of the feature tree, then draw a line with length=1 (i.e. D1@Sketch1 = 1).
The following dimensions you want to change will be multiplyed by "D1@Sketch1". You only have to configure D1, that will be =1 for Default configuration and whatever you need for the other configs. In this case you don't need variables.
Attachments
Config_dim.gif
Post Reply