Jump to content

Recommended Posts

Posted

I am sure there is a much simpler way to do this, but it works and thats all that matters, right? I always need to pull certain parts of a drawing out into a new file and to avoid all the copy clip open paste..... i created a program to do it for me. It uses 2 different LISPS and a script file.. (Again, im sure there is an easier way...)

 

 

This is the main code...

 
;   THIS COMMAND WILL SAVE A SELECTED PORTION OF A        ;
; DRAWING TO A NEW FILE AND OPEN THE SAVE AS DIALOG BOX   ;
;  CREATED BY JPLANERA     ;

(DEFUN C:ssome ( / sset BP)
 (setq sset (ssget))
 (princ "\n...Select base point:")
 (setq BP (getpoint))
 (command "copyclip" sset "")
 (command "script" "M:\\ENGR\\DRAWINGS\\AUTOCAD SETTINGS\\SCRIPTS\\OPEN_NEW_PASTECLIP.SCR")
 (princ))

 

 

This part of the code I auto load with the startup of AutoCAD

 
(defun c:ssomesave (/ FN)
 (setq FN (getfiled "Save Drawing As" "" "dwg" 1))
 (if (= FN nil )
   (progn
    (princ)(princ "...SAVEAS ABORTED...")(princ))
   (progn
    (setvar "cmdecho" 0)
    (command "saveas" "" FN "y")(princ))))

 

And here is the script file...

 
NEW

pasteclip
0,0
zoom
extents
ssomesave

 

I hope someone else finds this usefull, and of course, if it can be improved... bring it on! :-)

Posted

Thanks for sharing :)

works like a charm for me (tested on 2009)

Just one thing I want to suggest

pehaps would be good to display alert message in case

you want to save a file with existing name in this folder

In this case you may loss this existing drawing

Thanks,

 

Regards

 

~'J'~

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...