Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to define expressions (user vs named expressions)

Status
Not open for further replies.

Andersen07

Industrial
Dec 8, 2021
28
Suppose I'm modeling a block with the following dimensions:
Width = 10
Depth = Width * 2
Height = 12

Should I:

[ol 1]
[li]Create a user expression "Width = 10", then start a sketch, draw a rectangle and dimension it with linked expressions "p0 = Width" and "p1 = Width * 2"[/li]
[li]Start a sketch, draw a rectangle and dimension it with a named expression "Width = 10" and then "p0 = Width * 2"[/li]
[/ol]

Both cases seem to be the same, except for the "Source" column in the Expressions dialog. In the first case, the "Width" expression source column is empty, while in the second case it states "SKETCH_000:Sketch(1) [...]"

What's the difference between named expressions and user defined expressions? Which one should I prefer in most of the situations? Are there any differences in terms of performance in large models?
 
Replies continue below

Recommended for you

As for how the software performs, I don't think it makes much difference, however, if you stuck to expressions with logical names, it might make debugging quicker, to say nothing of making it easier for future users to understand what your original 'design intent' was.

John R. Baker, P.E. (ret)
Irvine, CA
Siemens PLM:
UG/NX Museum:

The secret of life is not finding someone to live with
It's finding someone you can't live without
 
John,
Thanks for the reply.
Both of my examples use logical names though. Which one would you choose?
 
You could treat it like writing a program, where you define all your variables and constants up front and then simply use them wherever they're needed. An alternative approach would be to just go ahead and define your expressions as you go, using the default names and then go back later and edit the expression names as needed to make it easier to understand and to help make it clear what your 'design intent' was. Note that one can get carried away with using long names which are really more descriptive than what they need to be. My second approach above would at least limit the use of descriptive names to where they actually help make things easier to understand, leaving the rest of the content as simple as possible.

John R. Baker, P.E. (ret)
Irvine, CA
Siemens PLM:
UG/NX Museum:

The secret of life is not finding someone to live with
It's finding someone you can't live without
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor