Author Topic: Insert block from Toolpalette  (Read 1191 times)

0 Members and 1 Guest are viewing this topic.

gerstal82

  • Guest
Insert block from Toolpalette
« on: January 29, 2008, 07:12:00 AM »
Hi there,

We work with autocad 2008, we have several blocks in the toolpalette.
These blocks have costum annotationscales attached to them. When we insert a block from the toolpalette the standard scales from autocad return(metric an architecturial).
When we insert the same block through the designcenter or drag and drop from windows, the scalelist remains the same as before.

Is this a bug or?

Greetings,

Gerard S.

Birdy

  • Guest
Re: Insert block from Toolpalette
« Reply #1 on: January 29, 2008, 08:48:47 AM »
Unfortunately (for me anyway), it's because of the way annotative scaling works.
I run a script file (called DESCALE) every so often to strip out the annoscales I don't want.

Code: [Select]
-SCALELISTEDIT
D
1:1
D
1:2
D
1:4
D
1:5
D
1:8
D
1:10
D
1:16
D
1:20
D
1:30
D
1:40
D
1:50
D
1:100
D
2:1
D
4:1
D
8:1
D
10:1
D
100:1
D
1/128" = 1'-0"
D
1/64" = 1'-0"
D
1/32" = 1'-0"
D
1/16" = 1'-0"
D
3/32" = 1'-0"
D
1'-0" = 1'-0"
E
regen
 
This keeps only the architectural scales we typically use. I call the script from a lisp, named DES.
Code: [Select]
(DEFUN C:DES ()
  (COMMAND "'_SCRIPT" "O:/AUTOCAD/SUPPORT/DESCALE.SCR")
  (command "qsave")
  (PRINC)
)
Adjust to suit your needs.  Maybe someone here can help accomplish this without the script.  I think it would run much faster, but, I'm not quite that good. :oops:
Hope this helps.

hudster

  • Gator
  • Posts: 2848
Re: Insert block from Toolpalette
« Reply #2 on: January 29, 2008, 09:27:57 AM »
from what I can gather from 2007 onwards the scale list is saved as part of the drawing, so inserting a block will bring the scale list from that drawing.

best bet is to go with birdy's option of deleting the ones you don't want, but i would add a reset option at the beginning of the script to bring the number of scales down first.

I'm sure someone will be able to write a lisp to do this much quicker though.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

Crank

  • Water Moccasin
  • Posts: 1503
Re: Insert block from Toolpalette
« Reply #3 on: January 31, 2008, 04:54:47 PM »
Put this in your acaddoc.lsp:
Code: [Select]
(defun c:MyAnnoScales (/ entlijst n schaal)
 (setq entlijst (dict-list (dict-name "ACAD_SCALELIST")))
 (foreach n entlijst
   (setq schaal (cdr (assoc 300 (entget (cdr n)))))
   (if (/= schaal "1:1")(command ".-scalelistedit" "Delete" schaal "Exit"))
 )
; Add scales:
; (command ".-scalelistedit" "A" "1:200" "1:200" "A" "1:500" "1:500" "A" "1:1000" "1:1000" "EXIT")
 (princ)
)

(c:MyAnnoScales)
Vault Professional 2023     +     AEC Collection