Author Topic: Change default scale for blocks  (Read 6475 times)

0 Members and 2 Guests are viewing this topic.

VerticalMojo

  • Guest
Change default scale for blocks
« on: May 27, 2004, 02:51:42 PM »
For this particular dwg I have to change the scale of all the blocks, but I have to enter in the scale every time. Is there a way to change the default scale to something other than "1"?

Thanks....

Edited: Correction.   I mean "1"  :roll:

M-dub

  • Guest
Change default scale for blocks
« Reply #1 on: May 27, 2004, 03:13:38 PM »
Not sure right now, but here's a routine that might help you out sometime anyway...Multiple Scale
(scales the selected entities using their insertion points as the base point)
http://theswamp.org/lilly.pond/M-dub/mscale.zip

pmvliet

  • Guest
Change default scale for blocks
« Reply #2 on: May 28, 2004, 10:34:51 AM »
I don't know how to actually do it but, there are block insertion routines that I have seen that will look at the dimscale variable for the scale to insert the block.

I would think you could use something similar where Autocad will look somewhere for the value...

Pieter
(needing to learn lsp, vba or other things...)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Change default scale for blocks
« Reply #3 on: May 28, 2004, 12:01:09 PM »
Quote
..... something other than 0?


Say what ??
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

VerticalMojo

  • Guest
Change default scale for blocks
« Reply #4 on: May 28, 2004, 12:11:21 PM »
Correction.   I mean "1"  :roll:

Thanks Kerry

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Change default scale for blocks
« Reply #5 on: May 28, 2004, 12:23:16 PM »
My pleasure :D

I'll make a deal with you :

If you write a specification for what you want to do, I will code it.

regards.Kerry

Addendum : If the specification is ambigious or incomplete you are expected to send a bottle of Marks favourite imbibing fluid to him.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Change default scale for blocks
« Reply #6 on: May 31, 2004, 09:52:56 PM »
Hmmm... that looks like a reactor waiting to happen ....
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

drizzt

  • Guest
Change default scale for blocks
« Reply #7 on: June 01, 2004, 03:41:00 PM »
I use a match scale routine. If I knew how to upload I would.

David Bethel

  • Swamp Rat
  • Posts: 656
Change default scale for blocks
« Reply #8 on: June 01, 2004, 04:27:42 PM »
I use this most of the time for preset scale inserts.  -David
Code: [Select]

;=======================================================================
;    INSCALE.Lsp                                    Mar 14, 2002
;    INSERT BASED ON A SET SCALE FACTOR
;================== Start Program ======================================
(princ "\nCopyright (C) 2003, Fabricated Designs, Inc.")
(princ "\nLoading INSCALE v2.1 ")
(setq ins_ nil lsp_file "INSCALE")

;================== Macros =============================================
(defun PDot ()(princ "."))

(PDot);++++++++++++ Set Modes & Error ++++++++++++++++++++++++++++++++++
(defun ins_smd ()
 (SetUndo)
 (setq oldlay (getvar "CLAYER")
       olderr *error*
      *error* (lambda (e)
                (while (> (getvar "CMDACTIVE") 0)
                       (command))
                (and (/= e "quit / exit abort")
                     (princ (strcat "\nError: *** " e " *** ")))
                (and (= (logand (getvar "UNDOCTL") 8) 8)
                     (command "_.UNDO" "_END" "_.U"))
                (ins_rmd))
       ins_var '(("CMDECHO"   . 0) ("MENUECHO"   . 0)
                ("MENUCTL"   . 0) ("MACROTRACE" . 0)
                ("OSMODE"    . 0) ("SORTENTS"   . 119)
                ("MODEMACRO" . ".")
                ("BLIPMODE"  . 0) ("EXPERT"     . 0)
                ("SNAPMODE"  . 1) ("PLINEWID"   . 0)
                ("ORTHOMODE" . 1) ("GRIDMODE"   . 0)
                ("ELEVATION" . 0) ("THICKNESS"  . 0)
                ("FILEDIA"   . 0) ("FILLMODE"   . 0)
                ("SPLFRAME"  . 0) ("UNITMODE"   . 0)
                ("TEXTEVAL"  . 0) ("ATTDIA"     . 0)
                ("ATTREQ"    . 1)
                ("ATTMODE"   . 1) ("UCSICON"    . 1)
                ("HIGHLIGHT" . 1) ("REGENMODE"  . 1)
                ("COORDS"    . 2) ("DRAGMODE"   . 2)
                ("CECOLOR"   . "BYLAYER")
                ("CELTYPE"   . "BYLAYER")))
 (foreach v ins_var
   (and (getvar (car v))
        (setq ins_rst (cons (cons (car v) (getvar (car v))) ins_rst))
        (setvar (car v) (cdr v))))
 (princ (strcat (getvar "PLATFORM") " Release " (ver)
        " -  Scale Inserts ....\n"))
 (princ))

(PDot);++++++++++++ Return Modes & Error +++++++++++++++++++++++++++++++
(defun ins_rmd ()
  (SetLayer oldlay)
  (setq *error* olderr)
  (foreach v ins_rst (setvar (car v) (cdr v)))
  (command "_.UNDO" "_END")
  (prin1))

(PDot);++++++++++++ Set And Start An Undo Group ++++++++++++++++++++++++
(defun SetUndo ()
 (and (zerop (getvar "UNDOCTL"))
      (command "_.UNDO" "_ALL"))
 (and (= (logand (getvar "UNDOCTL") 2) 2)
      (command "_.UNDO" "_CONTROL" "_ALL"))
 (and (= (logand (getvar "UNDOCTL") 8) 8)
      (command "_.UNDO" "_END"))
 (command "_.UNDO" "_GROUP"))

(PDot);++++++++++++ Make Layer Current +++++++++++++++++++++++++++++++++
(defun SetLayer (name / ldef flag)
  (command "_.LAYER")
  (if (not (tblsearch "LAYER" name))
      (command "_Make" name)
      (progn
        (setq ldef (tblsearch "LAYER" name)
              flag (cdr (assoc 70 ldef)))
        (and (= (logand flag  1)  1)
             (command "_Thaw" name))
        (and (minusp (cdr (assoc 62 ldef)))
             (command "_On" name))
        (and (= (logand flag  4)  4)
             (command "_Unlock" name))
        (and (= (logand flag 16) 16)
             (princ "\nCannot Set To XRef Dependent Layer")
             (quit))
        (command "_Set" name)))
  (command "")
  name)

(PDot);************ Main Program ***************************************
(defun ins_ (/ olderr oldlay ins_var ins_rst def nsc lb bn)
  (ins_smd)
  (setq def (getvar "USERR5"))
  (initget 2)
  (setq nsc (getreal (strcat "\nInsert Scale <" (rtos def 2 (max 2 (getvar "LUPREC"))) ">:  ")))
  (and (not nsc)
       (setq nsc def))
  (setvar "USERR5" nsc)
  (setq lb (getvar "INSNAME"))
  (while (or (not bn)
             (not (snvalid bn))
             (not (or (tblsearch "BLOCK" bn)
                      (findfile (strcat bn ".DWG")))))
         (setq bn (getstring (strcat "\nInsert <" lb">:   ")))
         (if (= bn "")
             (setq bn lb)))
  (SetLayer "0")
  (command "_.UCS" "_World")
  (command "_.INSERT" bn)
  (princ "\nInsert Point:   ")
  (command pause)
  (command nsc nsc)
  (princ "\nRotation Angle <0>:  ")
  (command pause)
  (while (> (getvar "CMDACTIVE") 0)
         (command ""))
;  (*break*)
  (ins_rmd))

(PDot);************ Load Program ***************************************
(defun C:INSCALE () (ins_))
(if ins_ (princ "\nINSCALE Loaded\n"))
(prin1)
;|================== End Program =======================================
R12 Dos - A2K

laura

  • Guest
Change default scale for blocks
« Reply #9 on: June 02, 2004, 07:51:30 AM »
This may over-simplifying the problem, but could you select the blocks and use properties to change the scale factor?  Of course this would only work if you can identify all the blocks and the new scale would be the same for all of them.

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Change default scale for blocks
« Reply #10 on: June 02, 2004, 08:09:13 AM »
Quote from: laura
This may over-simplifying the problem, but could you select the blocks and use properties to change the scale factor?  Of course this would only work if you can identify all the blocks and the new scale would be the same for all of them.


You can select all the blocks, using the "FILLTER: command.
I drink beer and I know things....

VerticalMojo

  • Guest
Change default scale for blocks
« Reply #11 on: June 02, 2004, 11:22:47 AM »
Quote from: Slim
Quote from: laura
This may over-simplifying the problem, but could you select the blocks and use properties to change the scale factor?  Of course this would only work if you can identify all the blocks and the new scale would be the same for all of them.


You can select all the blocks, using the "FILLTER: command.



I like the filter command.... For some reason my A-cad (LT) doesn't have a Icon for it..... Oh my, guess its gonna get one of my custom deranged smileys....


Well, We use the design center to drag and drop our blocks (I tried to push blockwerks but that was like hitting a brick wall). So, I guess wut Im trying to say is if I had a drawing that was done at a 1/4"=1'-0" I could arrange AutoCAD to set the scale to 48 by default. This way I can drag them into the drawing and put them in there place without messing with the scale. If not I would double click on the thumbnail to show the insert menu, change the scale to 48, and insert the block.... and this would be repeated for all blocks or just make a set of blocks that are already at a a scale of 48... UGH over 500 of'em.  I could change the scale by selecting all the block (with the filter command) then properties, but then you wouldn't have the blocks in the right position..... Guess I'm trying to customize LT waaaaaay to much. I think I'm ready for the Full Blown Version for work!!!!

BTW, I'm have access to FULL A-cad @ home so LISP routines are WeLcOmE! Only problem is that @ work others (including myself) would not be able to use the routine.., but I'll be able to try them when I get home....

Thanx for the input guys (and gals) :wink:

Slim©

  • Needs a day job
  • Posts: 6566
  • The Dude Abides...
Change default scale for blocks
« Reply #12 on: June 02, 2004, 12:11:15 PM »
Aren't there some add-on programs to AutoCAD Lite that will allow you to run Lisp? :?:  :idea: :)
I drink beer and I know things....

VerticalMojo

  • Guest
Change default scale for blocks
« Reply #13 on: June 02, 2004, 12:17:15 PM »
Yes I believe there is..... but we are basic, so I have to learn to get it done without third party help...  :cry:

VerticalMojo

  • Guest
Change default scale for blocks
« Reply #14 on: June 02, 2004, 02:18:11 PM »
David D Bethel,
That is kinda what Im looking for..... but the problem is that I need to drag and drop them from design center. The time it would take for me to look up the name of the block, make sure its loaded will take up to much time..... but thanks, I may be able to use that for something else!

Kerry,
Maybe a code for this.....

Ask user to specify a scale: 4,8,12,16,24,32,48,64,96,128,192......

From then on, every time they drag a block in it would be brought in that scale with-out using the "insert" pop up menu.....

Is this possible?????

Thanks!

laura

  • Guest
Change default scale for blocks
« Reply #15 on: June 03, 2004, 07:45:31 AM »
Quote
So, I guess wut Im trying to say is if I had a drawing that was done at a 1/4"=1'-0" I could arrange AutoCAD to set the scale to 48 by default.


Gotcha.  See, thought it was too simple........

Andrew H

  • Guest
Change default scale for blocks
« Reply #16 on: June 04, 2004, 02:24:00 PM »
Put them onto your Tool Pallette then right click (still on the TP) and change the properties, put the scale you want and insert away. If you need the same block at different scales, put it on the TP that many times and change the scale as needed.

VerticalMojo

  • Guest
Change default scale for blocks
« Reply #17 on: June 04, 2004, 02:27:34 PM »
Quote from: Andrew H
Put them onto your Tool Pallette then right click (still on the TP) and change the properties, put the scale you want and insert away. If you need the same block at different scales, put it on the TP that many times and change the scale as needed.


Andrew, what version are you using? remember im on Acad [tear] LT [/tear] 2k

Andrew H

  • Guest
Change default scale for blocks
« Reply #18 on: June 04, 2004, 02:31:36 PM »
I am sorry I thought you said 2k4. If 2k then ignore my post.

VerticalMojo

  • Guest
Change default scale for blocks
« Reply #19 on: June 04, 2004, 02:35:17 PM »
@ least I know how easy it is with 2k4!!! If thats the case Im really missing out :cry:

Andrew H

  • Guest
Change default scale for blocks
« Reply #20 on: June 04, 2004, 02:41:20 PM »
If you think you're missing out on 2k4 wait til you see 2k5, has very nice creature conforts.

VerticalMojo

  • Guest
Change default scale for blocks
« Reply #21 on: March 24, 2005, 12:54:46 PM »
In all our dwgs I can drag a block from DC and it will be 1:1

I just received a dwg that when I drag the same block from DC it comes in the wrong scale.

I cant figure how or why its doing this..... Am I forgetting something?

Andrew H

  • Guest
Change default scale for blocks
« Reply #22 on: March 24, 2005, 01:34:24 PM »
Did you check the units of the drawings you're bring them into?

MikePerry

  • Guest
Change default scale for blocks
« Reply #23 on: March 24, 2005, 01:34:43 PM »
Hi

Check out the following Technical Documents on the Autodesk web site under the Knowledge Base section -

ID: TS30666 - Set drawing units for inserted blocks and images

ID: TS20081 - Using the Insert Units option for blocks inserted from AutoCAD® DesignCenter™

Have a good one, Mike

VerticalMojo

  • Guest
Change default scale for blocks
« Reply #24 on: March 24, 2005, 04:22:09 PM »
ah Yes... the INSUNITS variable. problem solved. :)