Results 1 to 5 of 5

Thread: My quick Saves - Any improvements, ideas?

  1. #1
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default My quick Saves - Any improvements, ideas?

    Any improvement ideas???

    Code:
    (DEFUN c:qs (/ |cmdecho|)
      (SETQ |cmdecho| (GETVAR "cmdecho"))
      (SETVAR "cmdecho" 0)
      (COMMAND "_qsave")
      (c:setmacro)
      (PRINC "\nQSave Complete:")
      (SETVAR "cmdecho" |cmdecho|)
      (PRINC)
    ) ;_ end of DEFUN
    
    (DEFUN c:qsa (/ |cmdecho|)
      (SETQ |cmdecho| (GETVAR "cmdecho"))
      (SETVAR "cmdecho" 0)
      (COMMAND "_saveas" "" "~")
      (c:setmacro)
      (PRINC "\nSaveAs Complete:")
      (SETVAR "cmdecho" |cmdecho|)
      (PRINC)
    ) ;_ end of DEFUN
    
    (DEFUN c:qsall (/ |cmdecho|)
      (VL-LOAD-COM)
      (VLA-RUNMACRO (VLAX-GET-ACAD-OBJECT) "WriteSnapshot")
      (VLAX-FOR doc	(VLA-GET-DOCUMENTS (VLAX-GET-ACAD-OBJECT))
    	(IF	(AND
    	  (= :VLAX-FALSE (VLA-GET-SAVED doc) (VLA-GET-READONLY doc))
    	) ;_ end of AND
    	  (PROGN (WRITE-LINE (STRCAT "\nSaving " (VLA-GET-NAME doc)))
    		 (VLA-SAVE doc)
    	  ) ;_ end of PROGN
    	) ;_ end of IF
      ) ;_ end of VLAX-FOR
      (c:setmacro)
      (PRINC)
    ) ;_ end of DEFUN
    
    (DEFUN c:qsc ()
      (IF (= (GETVAR "DWGTITLED") 1)
    	(PROGN (COMMAND "qsave") (COMMAND "close"))
    	(PROGN (INITDIA) (COMMAND "SAVE") (COMMAND "CLOSE"))
      ) ;_ end of IF
      (PRINC)
    ) ;_ end of DEFUN
    
    (DEFUN c:qscopy	(/ |cmdecho|)
      (SETQ |cmdecho| (GETVAR "cmdecho"))
      (SETVAR "cmdecho" 0)
      (COMMAND "_qsave")
      (COMMAND "_save" "~")
      (c:setmacro)
      (PRINC "\nSaved and Saved Copy Complete:")
      (SETVAR "cmdecho" |cmdecho|)
      (PRINC)
    ) ;_ end of DEFUN
    
    (DEFUN c:qse (/)
      (VL-LOAD-COM)
      (VLA-RUNMACRO (VLAX-GET-ACAD-OBJECT) "WriteSnapshot")
      (VLAX-FOR doc	(VLA-GET-DOCUMENTS (VLAX-GET-ACAD-OBJECT))
    	(IF	(AND
    	  (= :VLAX-FALSE (VLA-GET-SAVED doc) (VLA-GET-READONLY doc))
    	) ;_ end of AND
    	  (PROGN (WRITE-LINE (STRCAT "\nSaving " (VLA-GET-NAME doc)))
    		 (VLA-SAVE doc)
    	  ) ;_ end of PROGN
    	) ;_ end of IF
      ) ;_ end of VLAX-FOR
    ;  (COMMAND "_quit")
      (PRINC)
    ) ;_ end of DEFUN

  2. #2
    Login to Give a bone
    0

    Default Re: My quick Saves - Any improvements, ideas?

    Your Qsave functions gave me some ideas for simplifying some of mine relating to Save, SaveAs, and Close.
    In general I use the shortcut (Ctrl-S) for SaveAs or Qsave.
    For Close I have a shortcut c:CX. It will only prompt to save the drawing if something has changed.
    (defun c:CX ()(princ "\nCLOSE")(command "CLOSE")(princ))

    I'm not sure what your function (c:setmacro) does. Can you include it so I can test it?

  3. #3
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: My quick Saves - Any improvements, ideas?

    Quote Originally Posted by Terry Cadd
    I'm not sure what your function (c:setmacro) does. Can you include it so I can test it?
    Code:
    ;;; SETMACRO function sets modemacro to show current "Last Saved Time", "Dimscale", "Osmode" value, "Textstyle",
    ;;; and "Group ON/OFF" on status line.
    
    (DEFUN c:setmacro (/ |savetime|)
      (SETQ	|savetime|
    	 (MENUCMD
    ;;;	   "M=$(edtime,$(getvar,date),DDD MO/DD/YYYY - H:MM:SS AM/PM)"
    	   "M=$(edtime,$(getvar,date),H:MM:SS AM/PM)"
    	 ) ;_ end of MENUCMD
      ) ;_ end of SETQ
      (SETVAR "modemacro"
    	  (STRCAT
    		"Last Saved: "
    		|savetime|
    		","
    		" Cmdecho: $(if,$(and,$(getvar,cmdecho),1),ON,OFF),"
    ;;;		" Groups: $(if,$(and,$(getvar,pickstyle),1),ON,OFF),"
    		" Psltscale: $(getvar,psltscale),"
    		" Ltscale: $(getvar,ltscale),"
    		" Dimscale: $(getvar,dimscale)"
    ;;;		 " Osnap: $(if,$(=,$(getvar,osmode),0),OFF,$(getvar,osmode)),"
    ;;;		" SpaceSwitch: $(if,$(=,$(getvar,spaceswitch),0),OFF,ON),"
    ;;;		" Textstyle: $(getvar,textstyle),"
    ;;;		" Pointstyle: $(getvar,pdmode)"
    ;;;		" ."
    	   ) ;_ end of STRCAT
      ) ;_ end of SETVAR
      (PRINC)
    ) ;_ end of DEFUN
    
    (c:setmacro)

  4. #4
    Login to Give a bone
    0

    Default Re: My quick Saves - Any improvements, ideas?

    I really liked what you did in (c:setmacro) with displaying information on the status line. Looks like it's easy to customize. I also liked your functions qs, qsa, qsc, and qscopy.

  5. #5
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    Default Re: My quick Saves - Any improvements, ideas?

    Thank you. They're getting there.

    Everything worked great in A2k2, but I'm ripping just about everything apart before I move it to A2k7.

Similar Threads

  1. 2015: NO pop-up on saves as - filedia is set to 1
    By JH75 in forum AutoCAD General
    Replies: 7
    Last Post: 2015-05-14, 04:30 PM
  2. Various ideas for improvements.
    By neje in forum ACA Wish List
    Replies: 4
    Last Post: 2012-10-30, 05:15 AM
  3. Ideas/suggestions on Line patterns/styles ideas sanitary pipe
    By legolas1366 in forum Revit MEP - General
    Replies: 0
    Last Post: 2009-06-01, 05:35 PM
  4. File only saves as .rte?
    By still.james in forum Revit Architecture - General
    Replies: 3
    Last Post: 2008-11-19, 09:28 AM
  5. DGN: Which Autodesk App.(s) Saves To DGN
    By chillme1 in forum CAD Management - General
    Replies: 10
    Last Post: 2007-05-10, 06:44 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
  •