Page 1 of 1

sketch dimensions and configurations

Posted: Wed May 24, 2023 3:49 pm
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.

Re: sketch dimensions and configurations

Posted: Wed May 24, 2023 4:04 pm
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.

Re: sketch dimensions and configurations

Posted: Wed May 24, 2023 4:06 pm
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?

Re: sketch dimensions and configurations

Posted: Wed May 24, 2023 4:30 pm
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?

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 6:34 am
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

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 7:49 am
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.

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 11:25 am
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.

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 1:18 pm
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.

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 2:09 pm
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.

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 2:22 pm
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

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 3:44 pm
by bnemec
DennisD wrote: Thu May 25, 2023 2:22 pmFIFY
And the third kind? Or is that the trick?

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 5:13 pm
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.

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 6:16 pm
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 ()

Re: sketch dimensions and configurations

Posted: Thu May 25, 2023 7:18 pm
by SPerman
I've always wondered why there were so many different ways to create relationships between variables.

Re: sketch dimensions and configurations

Posted: Mon Jun 12, 2023 2:28 pm
by bnemec
Is there a way to get the design table to recalculate/update without opening it?

Re: sketch dimensions and configurations

Posted: Mon Jun 12, 2023 3:04 pm
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.

Re: sketch dimensions and configurations

Posted: Tue Jun 13, 2023 7:10 am
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.

Re: sketch dimensions and configurations

Posted: Tue Jun 13, 2023 9:37 am
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.

Re: sketch dimensions and configurations

Posted: Tue Jun 13, 2023 9:52 am
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.

Re: sketch dimensions and configurations

Posted: Fri Jun 16, 2023 8:04 am
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 2427 times

Re: sketch dimensions and configurations

Posted: Thu Jun 22, 2023 8:35 am
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.