Results 1 to 5 of 5

Thread: Repetitive Copy/Paste/Save As

  1. #1
    Member
    Join Date
    2006-12
    Posts
    23
    Login to Give a bone
    0

    Default Repetitive Copy/Paste/Save As

    This is a pretty specific macro that I use for doing Copy/Paste/Save As but if it helps someone else great!

    I take multiple parts from a single drawing and separate them out into individual dwgs for the purpose of CNC machining. So for instance one drawing might have 100+ parts in it. I will Ctrl+C the part and then switch to my other drawing that has a single part in it and run my macro which erases all the geometry in the model space, pastes in the part I've got on my clip board and inserts it at 0,0. Does a zoom extent and prompts me to "Save As" all in one fell swoop.

    The best way to understand it is try it. Like I said though it's kinda specific and weird but other people might be doing something similar, or it might at least give you an idea of some similar process you are doing thats a pain in the butt.

    ^C^Cerase all ;_pasteclip 0,0;_zoom e _saveas

    I put it on my default shortcut menu for easy right-click action.

  2. #2
    Member
    Join Date
    2007-04
    Posts
    4
    Login to Give a bone
    0

    Default Re: Repetitive Copy/Paste/Save As

    That is great. And useful. But could you create a macro that would do that from begining to end.

    So you can pick the part then right click and have it copy to clip board, open a new drawing, paste @ 0,0, and save as. It would make it even easier if it did the save as automatically to dxf since most cnc programs use dxf files rather than drawing files.

    Does this make me look lazy? lol

  3. #3
    Member
    Join Date
    2006-12
    Posts
    23
    Login to Give a bone
    0

    Default Re: Repetitive Copy/Paste/Save As

    I tried something like that but the problem is that you are copying from one drawing and then paste into a completely different drawing and unless someone can tell me otherwise I don't believe you can start a macro on one drawing and continue it on another. Something like that is probably possible via a simple VB program of some sort but this does what I need so far.

    I do have a macro/vba snippet that I have assigned to my right-click menu that will swap open windows without going to Window>Drawing2 or having to click on a separate tab.

    My CNC software will thankfully accept DWG's so I don't have anything to worry about that, but using a combination of WBLOCK and the appropriate FILEDIA setting you might be able to do it all in one macro and get it to DXF without sweating. I'll play around with that later and see if I can come up with something.

  4. #4
    Member
    Join Date
    2006-12
    Posts
    23
    Login to Give a bone
    0

    Default Re: Repetitive Copy/Paste/Save As

    ^C^C-wblock \ ;0,0 \

    When you run that the first prompt is asking for the file name. Type in something like blahblah.dxf and it will do it as a DXF rather than a DWG. Then the second prompt is for you to select the geometry that you want saved out.

    A couple things I don't like about doing it this way is that I personally would rather have the file dialog box and I don't know if you can force it to pop up or not. And the other is that you have to run an OOPS command after its done since WBLOCK deletes your geometry that you select, yet for some reason it won't run it after WBLOCK in the same macro, I guess some sort of limitation.

    I might play around some more later but thats the best I could come up with on the spot.

  5. #5
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Re: Repetitive Copy/Paste/Save As

    Excellent idea here. I favor the wblock command.
    I can name the file and select the objects.

    I bet I could batch process the resulting files into
    dxf format using a script. I am guessing it could be done.
    How? Anyone care to take a stab?

Similar Threads

  1. 2012: Cannot copy and paste
    By jrb63 in forum AutoCAD General
    Replies: 2
    Last Post: 2014-01-30, 05:28 AM
  2. Right-click copy, paste, paste aligned
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2008-07-04, 11:39 AM
  3. Replies: 39
    Last Post: 2007-02-06, 07:08 PM
  4. Custom Save command, save a copy of DWG file locally
    By robert.1.hall72202 in forum AutoLISP
    Replies: 7
    Last Post: 2007-01-24, 09:22 PM
  5. Replies: 7
    Last Post: 2006-09-05, 06:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •