delete revision clouds

delete revision clouds

mruPRQUJ
Advocate Advocate
2,483 Views
35 Replies
Message 1 of 36

delete revision clouds

mruPRQUJ
Advocate
Advocate

Hi there,

 

Is it possible to create a lisp to delete revision clouds in the drawing? thank you very much in advance. 🙂

0 Likes
Accepted solutions (2)
2,484 Views
35 Replies
Replies (35)
Message 21 of 36

ec-cad
Collaborator
Collaborator

Per your previous post, when you type ASET at the Command Line, it looks like (for this opened drawing),

you have not loaded the ASET.lsp file (if that's what you named the .lsp).

Assuming the Lisp is named 'ASET.lsp', and it's stored in folder:  'C:\Lisp\', what you need to do, is add

the load to your startup. A classic method would be to create an acaddoc.lsp file, and place that in

your Acadxxxx\Support  folder. In that file, you can load the 'ASET.lsp' file, so the Function 'ASET' is 

'always' available. In the acaddoc.lsp, add:

(load "C:\\Lisp\\aset.lsp"); Load aset.lsp from C:\Lisp folder..

Save the file, and put it in your acadxxxx\support folder.

Now, each time you 'open' a file, or double-click on the .dwg file, the acaddoc.lsp fires up, and

loads the Function C:ASET.

So, you should be able to just key in ASET at the Command Prompt, and fire it up.

You will have to edit that ASET.lsp, and set the Date as desired, save..

Then just open any drawing, and type in ASET ...

 

ECCAD

Message 22 of 36

mruPRQUJ
Advocate
Advocate

It works perfect! Thanks a lot! 🙂

0 Likes
Message 23 of 36

mruPRQUJ
Advocate
Advocate

This one is helpful as well! Many thanks! 🙂

0 Likes
Message 24 of 36

mruPRQUJ
Advocate
Advocate

Thank you very much all of you!

Have a great weekend! 🙂

Message 25 of 36

john.uhden
Mentor
Mentor

@ec-cad ,

I think you can add (cons 410 (getvar "ctab")) to your filter list without having to vet things afterwards.

John F. Uhden

Message 26 of 36

Sea-Haven
Mentor
Mentor

For autoloads I use a lisp with all my usual lisps in it that I know I want to use, mine is called "autoload.lsp", you use Appload and save the lisp file to the Startup suite, much easier than to acaddoc.lsp. Also inside that custom lisp is use of the function "Autoload"

 

SeaHaven_0-1724561489284.png

The advantage is that the lisp is loaded when you type that command name. So it is not loaded till you actually need it.

Note I have my support paths set with a few directories so the lisp will be found by a simple name.

 

Message 27 of 36

ec-cad
Collaborator
Collaborator

John,

Thanks for pointing that out. I had tried that at first.

See what happens:

(setq ss (ssget "_x" '((-3 ("RevcloudProps")))(cons 410 (getvar "ctab"))))
Error: too many arguments
Error: Break...

(setq ss (ssget "_x" (list (-3 ("RevcloudProps")) (cons 410 (getvar "ctab")) )))
Error: bad function: "RevcloudProps"
Error: Break...

(setq ss (ssget "_x" (list (cons -3 "RevcloudProps") (cons 410 (getvar "ctab")) )))

Error: bad SSGET list value
Error: Break...

 

Maybe it's (my) error in where and how to put in that filter.

 

But, with this sequence - it works:

(setq ss (ssget "_x" '((-3 ("RevcloudProps")))))
<Selection set: 8>
(sslength ss)
4
(setq ent (ssname ss 0))
<Entity name: 1b916fe08e0>
(setq elist (entget ent))
((-1 . <Entity name: 1b916fe08e0>) (0 . "LWPOLYLINE") (330 . <Entity name: 1b902bcdda0>)
(5 . "2679E") (100 . "AcDbEntity") (67 . 1) (410 . "PROD-METR") ........

(getvar "ctab")
"PROD-METR"

(if (= (getvar "ctab") (cdr (assoc 410 elist))) (command "_erase" ent ""))
nil
;; Just One disappeared

 

I think it has to do with the -3 in: (ssget "_x" '((-3 ("RevcloudProps"))))

which was posted by another responder.

 

ECCAD

0 Likes
Message 28 of 36

john.uhden
Mentor
Mentor

@ec-cad ,

I think you have a right parenthesis in the wrong place...

(setq ss (ssget "_x" '((-3 ("RevcloudProps")))(cons 410 (getvar "ctab"))))

Plus you can't quote a construct.

I think it should be:

(setq ss (ssget "_x" (list '(-3 ("RevcloudProps"))(cons 410 (getvar "ctab")))))

John F. Uhden

Message 29 of 36

ec-cad
Collaborator
Collaborator

Thanks John,

Good find. Works a treat !

Now, I just got to 'study' that one.

(setq ss (ssget "_x" (list '(-3 ("RevcloudProps"))(cons 410 (getvar "ctab")))))

The OP says what I posted works, so I'll leave it at that.

🙂

 

ECCAD

0 Likes
Message 30 of 36

john.uhden
Mentor
Mentor

@ec-cad ,

Just remember that it's a filter list.

But I'm not sure about (getvar "ctab").  That says entities in a paperspace layout.

But what if one of its ModelSpace viewports is active?  Or doesn't that matter?

John F. Uhden

Message 31 of 36

mruPRQUJ
Advocate
Advocate

The modelspace viewport is not active, thanks.

0 Likes
Message 32 of 36

ec-cad
Collaborator
Collaborator

John,

You are right again. Probably should add a (command "_pspace") in there..

IF your 'current' tab = "Model",  then (getvar "ctab") returns "Model". I think..

 

ECCAD

0 Likes
Message 33 of 36

mruPRQUJ
Advocate
Advocate

Hi there,

 

Could you please tell me more how to use it (Autoload)? What is the difference between "copycommand" and "zzz" in your Autoload lisp? I created one, but it did not work. The below is my Autoload lisp, many thanks. 🙂

(autoload "bfind" '("bfind"))
(autoload "aset" '("aset"))
(autoload "BCH_H_Reporting" '("BCH_H_Reporting"))
(autoload "cpy2lay" '("cpy2lay"))
(autoload "ctabs" '("ctabs"))

0 Likes
Message 34 of 36

john.uhden
Mentor
Mentor

@ec-cad ,

You think correctly.

John F. Uhden

0 Likes
Message 35 of 36

Sea-Haven
Mentor
Mentor

Are the lisps in a support path ? I have all my lisps in supported directories. For Acad have trusted paths as well.

 

Maybe zzz and copycommand are the same, forget when I set these up, I have "goto layout" twice as I always type goto as goot so just traps that.  

Message 36 of 36

mruPRQUJ
Advocate
Advocate

Hi there,

 

It works now. I made a mistake, the first one should be the file name, second one is calling "command". Thank you very much! 🙂

0 Likes