Cadapult
Starting Member
USA
2 Posts |
Posted - January 04 2010 : 11:34:52 AM
|
Here's what I'd like to do: Open a file, change the color of all the entities to "byblock", WBLOCK the file over itself, get out of the drawing without saving, open the next drawing, change the color..., etc.
Why do I want to WBLOCK the file over itself without saving, you ask? Because doing this reduces the files to their absolute minimum size, giving us part files 40-60% smaller than the same files saved normally. I have thousands of files I need to update and shrink, and it would be nice to use Hurricane to do it.
Here is the script file so far:
;;CHANGES THE COLOR OF ALL ENTITIES TO 'BYBLOCK' ;; CHANGE ALL
P C BYBLOCK
_REDRAW (LOAD "D:/DEPT/ENGINEERING/CAD/UBERPURGE.LSP") UBERPURGE
Here's the purge LISP called by the script routine:
(defun C:UBERPURGE () (setvar"tilemode" 1) (command ".ucs" "W" "zoom" "e") (command "wblock" (strcat(getvar"dwgprefix")(getvar"dwgname")) "Y" "" "non" "0,0" "w" (getvar"vsmin") (getvar"vsmax") "") );end UBERPURGE
The change color and WBLOCK parts are cake, it's getting out of the file without saving it or breaking the script that's got me baffled. So, does anyone have an idea how this might be accomplished?
Thanks,
Mike |
"Shoot me now! Shoot me now!" -Daffy Duck |
|