Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

Constraints are not preserved when copying sketch items

Julie_7
Advocate

Constraints are not preserved when copying sketch items

Julie_7
Advocate
Advocate

Lets say that I have a rectangle and I add three lines to delimit a small part of the rectangle. Those lines are fully constrained.

Julie_7_0-1707851728494.png

Now I want to duplicate those three lines multiple times to create bounded areas for extrusion. Instead of redrawing them, I just select the 3 lines and copy then paste. After paste I drag the new items to the right and click okay. I expect the lines to be unconstrained because I have changed the x position and with that dimension missing they are still movable.

 

Julie_7_1-1707851759176.png

 

Then, in order to position the lines, I add a dimension constraint.

 

Julie_7_3-1707852289447.png

 

Notice that two of the lines are still no fully constrained. The perpendicular and coincident constraints were not copied.

I had originally used constraints instead of dimensions for the copies in order to clean up the sketch. (Equality for line lengths) After realizing that the dimensions do get copied, I copied from dimensioned items in order to reduce my work.

 

Now imagine that I want to copy the same three lines 20 more times. The fact that the constraints are not copied means that copy/paste does not save me any time. I have tried to use different types of constraints and nothing works.

 

What I expect, and what I would like is to use only constraints, as below, to make the first copy a duplicate of the second in all but x position.

Julie_7_4-1707852625465.png

Then copy and paste with only translation of the x position should maintain all of the constraints during the copy.

Surprisingly, there was one constraint that was kept for a vertical line, but all the others are gone.

If the move part of the paste is only a translation in the x direction then I do not understand why the coincident constraints with the bottom line should be removed. If the translation was in the y direction that would make sense.

The equality of line length constraints never have a reason to be removed, regardless of the new position. That would also apply to any constraints among the copied lines such as perpendicular.

 

Julie_7_5-1707852785124.png

 

 

 

 

 

 

0 Likes
Reply
529 Views
9 Replies
Replies (9)

jeff_strater
Community Manager
Community Manager

In your example, I would not expect the bottom two constraints to be copied.  Constraints are between two sketch items.  If you only copy/paste one of the items, the constraint or dimension to the un-copied item will be dropped.  I don't know why the top constraint was lost, and I cannot reproduce this:


Jeff Strater
Engineering Director
0 Likes

Julie_7
Advocate
Advocate
I understand that constraints are between two sketch items. When I copy one item and move the copy in a way that does not affect the constraint I do not understand why it is not still valid. I am copying in the same sketch.

What about the equality constraint on line lengths?
Or collinear constraints?

I tried making the first copy constrained by using equality and collinear to the original lines and then using that copy to create the others. My thought was that those types of constraints should still be valid for the copy.
0 Likes

TheCADWhisperer
Consultant
Consultant

@Julie_7 

What is your end goal?

Perhaps Pattern would be a better technique.

In any case, I recommend that you use whatever techniques you can figure out and then Attach your file here for tips by the experts.

0 Likes

Julie_7
Advocate
Advocate
I cannot use patterns because the offset distances are different for each instance. I use a script to update the parameters used to calculate distances depending on what is being stored in the tray.
0 Likes

TheCADWhisperer
Consultant
Consultant

@Julie_7 wrote:
I cannot use patterns because the offset distances are different for each instance.

Doesn’t matter.

0 Likes

Julie_7
Advocate
Advocate
What do you mean by "Doesn't matter"?
Is there some way to use a pattern with an array of spacing distances?
0 Likes

TheCADWhisperer
Consultant
Consultant

@Julie_7 

Do it the hard way and Attach your file here.

0 Likes

ericjm297ML
Explorer
Explorer

This is typical of people suggesting a poor alternative rather than addressing a obvious problem. I have a similar problem.
I have a complex sketch that I want to use in a different part. It is fully constrained to the origin point. If I copy and past this into a new sketch and constrain the same base point (a fully dimensioned and constrained line) to the origin in the new sketch, nothing is constrained except that line. I need to delete all dimensions and all constraints and do them again. All the original constraints are there and recognized because I get over constrained warnings if not deleted yet the sketch is still unconstrained. It seams like the software needs to do each constraint in order and it cant reproduce this when pasting.

As for the above example my recommendation is that it is possible to entirely constrain the inner rectangle to it self with out reference to the bottom line. you can then give it a single constraining horizontal construction line joining its bottom left corner to the bottom left corner of the larger rectangle. One should then simply redefine that length and make the far left end of the line coincident with the bottom left corner of the big box. That is about the easiest I think that you will get it.

0 Likes


@ericjm297ML wrote:

 If I copy and paste this into a new sketch and constrain the same base point (a fully dimensioned and constrained line) to the origin in the new sketch, nothing is constrained except that line. I need to delete all dimensions and all constraints and do them again.


@ericjm297ML 

Can you Attach an example that exhibits this behavior? (Please don't delete and dimensions or constraints in your illustrative example.)

0 Likes