Message 1 of 36
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
Is it possible to create a lisp to delete revision clouds in the drawing? thank you very much in advance. 🙂
Solved! Go to Solution.
Hi there,
Is it possible to create a lisp to delete revision clouds in the drawing? thank you very much in advance. 🙂
Solved! Go to Solution.
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
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"
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.
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
@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
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
@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
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
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"))
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.
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! 🙂