Lisp for Purge dialog box..

Lisp for Purge dialog box..

rob.aHH2T8
Enthusiast Enthusiast
573 Views
6 Replies
Message 1 of 7

Lisp for Purge dialog box..

rob.aHH2T8
Enthusiast
Enthusiast

What's is the lisp that will automate my purge: 1-open purge, 2-'purge all', 3-close the box?

0 Likes
574 Views
6 Replies
Replies (6)
Message 2 of 7

cadffm
Consultant
Consultant

You can't control dialog windows by lisp, but you can use command "-PURGE" to do what you want!

In Lisp you can controle all commandline commands by using Lispfunction COMMAND

Note: Script,Macro,Command&sendcommand will start -PURGE, also while you trying to start PURGE command in automations.

 

Script:

-PURGE

ALL

*

no

 

Menumacro:

-PURGE;all;*;no

 

 

Lisp(command

(command "-PURGE" "all" "*" "no")

 

Sebastian

Message 3 of 7

pendean
Community Legend
Community Legend
0 Likes
Message 4 of 7

rob.aHH2T8
Enthusiast
Enthusiast

I don't understand.

 

I have 'purge' as a quick command: cc

 

I then manually click on the 'purge all' and hit close.  If it's anything more than 3 clicks, it's not automatic enough.

0 Likes
Message 5 of 7

cadffm
Consultant
Consultant

@rob.aHH2T8  schrieb:

I don't understand.


I offered three ways, if you don't understand none of them - it isn't much 😄

Okay, you have to use command -PURGE to automate your wish to purge all.

 

You can create and use a script, or a menumacro, or action macro or any kind of api /programming

and if you are not familiar to all of them:

 

Do you know how to save and autoload a lisp file?

If yes, use this code:

 

(defun c:CC nil (command "_.-PURGE" "_all" "*" "_no")(princ))

 

As first test: Copy this line and paste it into your commandline, after that - try the new CC command

Sebastian

Message 6 of 7

RobDraw
Mentor
Mentor

@rob.aHH2T8 wrote:

I then manually click on the 'purge all' and hit close. 


You can replace this with Alt+A.

 


@rob.aHH2T8 wrote:

If it's anything more than 3 clicks, it's not automatic enough.


That brings it down to 2 clicks.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 7 of 7

Sea-Haven
Mentor
Mentor

If you get serious about purge often it needs to run say 3 times. If you have CIV3D need to use a separate purge command before purge.

 

If you make a startup.lsp you can have a lisp defun that is your purge, use Appload save to Start up Suite. My startup lisp has like 30 defuns. Or add to the default Acadxxxx.lsp ones.

 

 

(defun c:PPP ( / )
(command "-purge" "A" "*" "N")
(command "-purge" "A" "*" "N")
(command "-purge" "A" "*" "N")
(princ)
)

 

 

The purge for civ3D is purgestyleandsettings, can make a massive difference to size of dwg.

0 Likes