PDA

View Full Version : Help with UCS, Purge and QSave clean-up macro



philpiper
2006-09-15, 10:58 AM
Morning all,

I'm after some help in putting together a macro that will return the UCS to World, Purge the drawing of all unwanted items and then perform a QSAVE. I can get the UCS and QSAVE parts to work fine. The bit I'm having trouble with is automating the PURGE. It needs to work without user input.
The point of the macro is to try and instill a bit of housekeeping on our files after each time a user has been in and worked on one.
Can anyone help me with a bit of code for the PURGE part?

Many thanks.

Spike

Opie
2006-09-15, 02:22 PM
Morning all,

I'm after some help in putting together a macro that will return the UCS to World, Purge the drawing of all unwanted items and then perform a QSAVE. I can get the UCS and QSAVE parts to work fine. The bit I'm having trouble with is automating the PURGE. It needs to work without user input.
The point of the macro is to try and instill a bit of housekeeping on our files after each time a user has been in and worked on one.
Can anyone help me with a bit of code for the PURGE part?

Many thanks.

Spike
You should probably ask this in the AutoLISP (http://forums.augi.com/forumdisplay.php?f=91) forum by posting the code that you have come up with and see what else needs to be done or corrected.

You may also have a look at this search of the AutoLISP forum for the word PURGE (http://forums.augi.com/search.php?query=purge&searchuser=&exactname=0&starteronly=0&forumchoice=91&childforums=1&titleonly=0&showposts=0&searchdate=&beforeafter=&sortby=&sortorder=&replyless=0&replylimit=0&searchthread=0&searchthreadid=0&saveprefs=0&do=process)

philpiper
2006-09-15, 03:21 PM
It's OK, got it cracked now. It was simple when I sat down and thought about it. The macro is as follows:

^C^Cucs w -pu a n audit y qsave

Now, each time I hit the SAVE button, the drawing is returned to UCS World, zoomed to extents, purged and audited and then saved.
It was just as an aid to internal housekeeping really. Some of our files end up with so much rubbish left lying around after god knows how many different users have had a dabble in them.

Seems to work a treat.

Spike

jaberwok
2006-09-15, 03:28 PM
Morning all,

I'm after some help in putting together a macro that will return the UCS to World, Purge the drawing of all unwanted items and then perform a QSAVE. I can get the UCS and QSAVE parts to work fine. The bit I'm having trouble with is automating the PURGE. It needs to work without user input.
The point of the macro is to try and instill a bit of housekeeping on our files after each time a user has been in and worked on one.
Can anyone help me with a bit of code for the PURGE part?

Many thanks.

Spike

This works as part of a script -

"-purge
all

n
"

Wanderer
2006-09-15, 10:39 PM
Spike,

Hi, I'm going to move this from the tips and tricks forum to this one, as I believe it will be better served here. Thanks.
Morning all,

I'm after some help in putting together a macro that will return the UCS to World, Purge the drawing of all unwanted items and then perform a QSAVE. I can get the UCS and QSAVE parts to work fine. The bit I'm having trouble with is automating the PURGE. It needs to work without user input.
The point of the macro is to try and instill a bit of housekeeping on our files after each time a user has been in and worked on one.
Can anyone help me with a bit of code for the PURGE part?

Many thanks.

Spike