Streamlined Linework Copying in Xref Drawings: Automatic 2-Unit Offset Automation

Streamlined Linework Copying in Xref Drawings: Automatic 2-Unit Offset Automation

oscar.canedo.romero
Explorer Explorer
482 Views
5 Replies
Message 1 of 6

Streamlined Linework Copying in Xref Drawings: Automatic 2-Unit Offset Automation

oscar.canedo.romero
Explorer
Explorer

Is there a way to streamline the process of copying linework within an xref drawing by automatically incorporating both the "ncopy" and "offset" commands with a fixed distance of 2 units, eliminating the need to execute them separately each time?

0 Likes
Accepted solutions (1)
483 Views
5 Replies
Replies (5)
Message 2 of 6

RobDraw
Mentor
Mentor

Yeah, but I'm wondering, "Why?"


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 3 of 6

oscar.canedo.romero
Explorer
Explorer

Hi Rob, the purpose is to enhance efficiency and minimize time consumption when working on my drawing projects.

0 Likes
Message 4 of 6

RobDraw
Mentor
Mentor

Yeah, you said that but what are you actually doing and why are you utilizing an XREF?


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 5 of 6

Kent1Cooper
Consultant
Consultant
Accepted solution

Something along these lines [in most basic terms, very lightly tested]?

(defun C:NCO2 (); = Nested-Copy and Offset 2 drawing units
  (command
    "_.ncopy" (getpoint "\nNested object to copy & offset: ") "" "0,0" ""
    "_.offset" 2 (list (entlast) (getvar 'lastpoint)) pause ""
  ); command
  (prin1)
)

It honors your setting for the Erase option in the Offset command, but could be made to delete the Ncopied object regardless, if that's part of what you want to do.

It's a little odd about using (getpoint) for the selection [including running Osnap if it's on], because for some reason using (car (nentsel)) [the object part of nested-object selection] doesn't work in NCOPY, as I fully expected it to -- it says "No valid objects selected for NCOPY."  The result from (getpoint) is accepted, and finds the nested object.  That could probably be accounted for in some other way.

It doesn't do some things that it could be made to, such as to verify that the nested object you selected is Offsettable.

Kent Cooper, AIA
Message 6 of 6

oscar.canedo.romero
Explorer
Explorer

Thank you very much. I'm extremely  grateful for your assistance and for taking the time to help. 

This is perfect 😀

0 Likes