Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

How to copy a sketch with expression within the same part? 1

Status
Not open for further replies.

yy912

Mechanical
Oct 7, 2022
14
0
0
US
Hi everyone, I have a sketch with dimensions defined. I want to copy the sketch to other planes to create extrudes of the same profile but with different width/thickness and at different locations. I want them to link to each other so that in the future I can change one parameter and update all feature in once.

I've tried following ways but all failed:
1. Link the dimension with expression. Create sketch1 and copy sketch1 as sketch2. In sketch2, use formulas to link the dimensions to sketch 1, like "dim B in sketch2 = dim A in sketch1". But when I copy sketch 2 as sketch 3, all expressions do not link to sketch1 but make them as new variables? It looks like "define new dim C, dim D in sketch3 = dim C, rather than = dim A in sketch1"
In thread561-245938 it refers to "expression transfer modes", seems like it's the expression copying method I need to setup, but I cannot find further related info.

2. Create linked sketches. thread561-371063 talks about linked sketches from one part to another, but seems WAVE geometry linker only allows links between different parts. It does not allow links within the same part?
By the way, I wonder how to control the position of a linked sketch? For regular sketch I can reattach to define the origin and orientation of its datum plane. But seems there is no such an option for linked sketch? When editing linked sketch it's only a preview in its original part.

Thank you for any suggestion!

NX 1919 Windows 11
 
Replies continue below

Recommended for you

I do further testing with expressions.
Seems like if I define an independent variable VAR1, define dim A in sketch1=VAR1, and copy sketch1 as sketch2, the expression can be kept as expected. I will get dim B in sketch2=VAR1. If I update VAR1, both dim A and B will update. That's what I need.

But if I rename dim A as VAR1, and set dim B in sketch2=VAR1(the actual dim A in sketch1), then copy sketch2 as sketch3, NX will create a new dim D with value equals to VAR1(dim A), and dim C in sketch3=dim D, not refer to VAR1(dim A). In this case changing VAR1(dim A) does not update dim C.

NX processes reference to independent variables and sketch-dependent dimensions differently when copying?

NX 1919 Windows 11
 
Sorry for the late reply.

Associative copying a sketch inside a part is as simple, as difficult to find.

1. Create a sketch onto a certain datum CSYS.
2. Create and orient a new CSYS to your liking
3. Use the Pattern Feature function
3.a. Select feature: Select the sketch in the model tree
3.b. Layout: Select General
3.c. From Location: Select CSYS. Specify CSYS: Select the original CSYS from the model tree.
3.d. To: Press select CSYS. Select the New CSYS from the model tree.
3.e. Oriëntation: Follow pattern
3.f. Method: Variational would work.

In the case of steel profiles, it might be easier to locate them as separate parts in an assembly.
The main profile sketch can either be wave-linked to a base part (make it ref-only in the assembly tree), or non-associative in the part.

The new sketch remains associative to the original sketch and to the new CSYS.

Good luck!
 
Hi RvdL, thank you for the great solution!
With patterned sketch, not only can I associate the dimensions among different sketches, but I can also add or remove curves as needed and have the rest sketches updated in once.
It takes a bit more time to create a new CSYS (I usually just attach sketch to existing face) but it's much easier to maintain and modify the feature in the future.

But I don't quite understand why it's easier to make separate parts for steels (sheet metal?) Sheet metal can only be flattened in one piece when the features (tabs, flanges, etc) are in a single part, isn't it?

NX 1919 Windows 11
 
You mention NX1919, is this the new sketcher or the old ?
- I so far have very little experience with the new, do not know if this applies to the new sketch or not.

When pasting a copied sketch ( Ctrl-c and Ctrl-V) there is an option "Expression Mapping",
"Create new" will create new expressions in the copy.
"Link to original" will create expressions in the copy similar to p16 = p1 ( where p1 is in the master sketch and p16 in the copy) The benefit of this method is that you can edit the link.
"reuse original" will in the copy use the same variable "example : p12" for both sketches. editing any of these sketches , the dimensions will display a "warning such as "//used by...""
you can delete one of the dimensions but you cannot create a new such dimension manually.


A "Wave link" is a link between files in NX, the position is determined by the position of the component.
an "Extracted body/ Composite curve/Sketch" is basically the same as the wave link but in the same file. Position is the same as the master.

In case you want an associative copy of that sketch , you can either do the copy/paste , or use Pattern feature OR Pattern Geometry.
The Pattern Geometry will copy the curves ( it will copy all selected so be careful in selecting) of that sketch, the copy does not have any expressions but it is 100% associative to the master and will produce exactly the same output ( Solids/Sheets) as a sketch. ( Note that this is NX and possibly different than other cad systems in this aspect. Solid and sheet bodies can be created by any type of geometry that resembles "a curve", it does not have to be a sketch.)

Regards,
Tomas



The more you know about a subject, the more you know how little you know about that subject.
 
Status
Not open for further replies.
Back
Top