[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Copy and Paste to Original Coordinates
Tip# 4154 By Samuel Lucido On 08-Jul-2013
0
Rated By 0 users Downloaded : 136
Categories : User Coordinate System
Software type : AutoCAD 2014
Rename File To : cp0.lsp
Copy linework from one file to another.

Tipster Sam J. Lucido shares a tip and LISP routine that can assist AutoCAD users when trying to get linework from one file to another based on a set of coordinates.

"A great way to move objects between maps and keep the same location is the PasteOrig command. This command can be found on the Home tab of the ribbon under the Clipboard Panel, as shown here.



"Simply select your objects in one drawing, move to the next drawing, and choose Paste to Original Coordinates. Provided the coordinate systems are the same, your object(s) will be placed in the same location on the new map as they are on the original.

"You can also try the attached LISP routines to make this process a bit quicker. Type C0 to copy your object(s) (using a base point of 0,0,0), then P0 to place that object(s) back in using the same reference point. This works great when pasting into several drawings since you can hit the P0 with your right hand only, knowing those keys are right next to each other. Copy the code below into your startup suite, and use it each time you launch AutoCAD."

     (defun c:c0 () (command "copybase" "0,0,0")(princ))
     (defun c:p0 () (command "pasteclip" "0,0,0")(princ))


Notes from Cadalyst tip reviewer Brian Benton: I copy and paste all the time — likely on a daily, if not hourly, basis. There are many scenarios in which these tools can be helpful. When a user copies, the items are placed in the Windows Clipboard. Pasting places a copy of those items into the drawing file at the coordinates specified.

If an origin point is not specified, then the lowest and leftmost coordinate of the items selected is used as the origin. There are a few ways to control what that coordinate is; the LISP routine supplied here is an easy one. It uses coordinates 0,0,0 as the origin point, which is the same as using the Paste to Original Coordinates option.

If you want to specify an origin that is not the lower left corner or the original coordinates, press Ctrl+Shift+C when making your selection. This will copy the items to the clipboard and give you the option of selecting a new base point, or point of origin. This is handy if you are on a different coordinate system, or you want to use this tool as a form of the Copy command in AutoCAD.

 

Average Rating:
0


User comments
Comment by Beckman,Eric
Posted on 2013-07-18 10:55:55
The clipboard is also easily accessed through the default right click menu in the later versions of AutoCAD (2010 & up I believe) as are all of the Paste options. When using the right click method however, I have found that sometimes the Past to Original Coordinates is grayed out. Not to fear... just select an item in the drawing so that grips are shown and then the Paste to Original Coordinates option will become live. Paste your items and hit escape to clear your selection. The Copy with Basepoint and Paste functions not only work with linework, but will work with any item or object in your drawing. Its an extremely useful tool.


Log In