Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete ALL “drawing scales”,

51 REPLIES 51
SOLVED
Reply
Message 1 of 52
JamaL9722060
9957 Views, 51 Replies

Delete ALL “drawing scales”,

 

Delete ALL “drawing scales”,

 

I couldn’t figure out if there is a way to delete all “drawing scales” (attached) in one go. The delete should include all scales even those which are used in the drawing. One drawing scale is required to be kept which is 1:1.

 

 

Is that possible

 

Thank you

 

Best

 

Jamal

---------------------------
Jamal Numan
51 REPLIES 51
Message 2 of 52
rkmcswain
in reply to: JamaL9722060

Command: 
-SCALELISTEDIT
Enter option [?/Add/Delete/Reset/Exit] <Add>: D
Enter scale name to delete or * to delete all unused scales: *
Enter option [?/Add/Delete/Reset/Exit] <Add>: E
Command:


;
; or using lisp
(vl-cmdf "-scalelistedit" "_D" "*" "_E")
;

 That won't delete scale list entries in use just like you can't purge layers or linetypes in use.

R.K. McSwain     | CADpanacea | on twitter
Message 3 of 52
JamaL9722060
in reply to: rkmcswain

Thank you very much rkmcswain for the help. This is very useful.

 

Is there a way to select objects that have a particular drawing scale? For example, how to select all objects that have the 1/200 drawing scale (attached)?

---------------------------
Jamal Numan
Message 4 of 52

if you set that scale current, then turn the light bulb next to the scale bar off, it will show ONLY the objects that have that scale associated (only objects active in the drawing).
Message 5 of 52

Thank you very much conormccartney3897 for the help

 

The issue here is that I need a lisp file that can do this in one go. This lisp file is supposed to do this automatically without the need to go through the scales one by one and delete them from objects (annotation objects) they are attached to. It is really long process if we delete the scales manually (attached).

 

Is that possible?

---------------------------
Jamal Numan
Message 6 of 52

Yes its possible, here's a quick lisp, it requires you to set the scale you want to keep, entered in the same format as it appears in the scale list, then deletes the extras. I cannot use a code block like normal, so this may be a little garbled. /p (defun c:scalereset (/ scl) (setq scl (getstring "/n Enter Annotation Scale:")) (command "cannoscale" scl "") (command "-scalelistedit" "d" "*" "e") (princ) )
Message 7 of 52

copy everything after the /p (i thought i rembered a work around) also this can be used with scriptpro to batch process, as you may need to run it on xref'd files as well.
Message 8 of 52

Thanks conormccartney3897 for the help,

 

Could you please integrate the code in one *.lisp file?

 

I have little experience in development

---------------------------
Jamal Numan
Message 9 of 52

um sure...ill have to do it later tonight at home, at work computer does not allow me to post things.
Message 10 of 52

Hi conormccartney3897,

 

Any update?

 

Thanks

 

Jamal

---------------------------
Jamal Numan
Message 11 of 52

D'oh! Sorry bout that, I just set a reminder for myself to do this tonight.
Message 12 of 52

Bah. Sorry Jamal, apparently my reminder failed so try this instead, copy everything starting with (defun, in autocad, type VLIDE, this brings up the LISP interface. In a black file paste the code. you can change the command used by change what is after the "c:" statement. (defun c:scalereset (/ scl) (setq scl (getstring "/n Enter Annotation Scale:")) (command "cannoscale" scl "") (command "-scalelistedit" "d" "*" "e") (princ) )
Message 13 of 52

Many thanks conormccartney3897,

 

The *.lsp file works fine. It deletes all the annotation scales in one go (attached)

 

What should one type in the box of the “/n Enter Annotation Scale” (attached)?

---------------------------
Jamal Numan
Message 14 of 52

oh! enter in the desired scale to keep/set as current, needs to be entered in exactly as it appears in scale list. Also you can remove /n from the GETSTRING, appears we didn't need that.
Message 15 of 52

Thanks. That’s great.

 

Best

 

Jamal

---------------------------
Jamal Numan
Message 16 of 52

You're welcome.
Message 17 of 52

 

Hello

 

I am not at all a Lisp/VLisp developper but the "international" routine would be >>

 

 
(defun c:ScaleReset (/ scl)
 (setq scl (getstring "Enter Annotation Scale: " ))
 (command "cannoscale" scl )
 (command  "_-scalelistedit" "_d" "*" "_e" )
 (princ)
) 
 

 

 

The line:   (command "cannoscale" scl "")

generated an error but the routine was correct ...

 

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 18 of 52

WITHOUT USING LISP HOW WE CAN DELETE ANNOAUTO SCALE
Message 19 of 52
rkmcswain
in reply to: shavezkhan

shavezkhan wrote:
WITHOUT USING LISP HOW WE CAN DELETE ANNOAUTO SCALE

See post #2 in this thread.

 

R.K. McSwain     | CADpanacea | on twitter
Message 20 of 52
JamaL9722060
in reply to: braudpat

Hi conormccartney3 and braudpat,

 

Is there a way to re-develop the lisp file (attached) to delete the ALL the annotation scales even the used ones (except the current)?

 

---------------------------
Jamal Numan

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost