TheSwamp
CAD Forums => CAD General => Topic started by: ELOQUINTET on October 24, 2003, 02:46:16 PM
-
hey i was just wondering if there is a way to make architectural units appear at the top of my viewports pulldown in the viewports toolbar instead of engineering. thanks
dan
-
Viewports pulldown?? Are you using vanilla ACAD with a custom menu?
-
um no i'm talking about the standard viewports pulldown from view/toolbars. the pulldown puts engineering units at top and i want architectural at top.
dan
-
um no i'm talking about the standard viewports pulldown from view/toolbars. the pulldown puts engineering units at top and i want architectural at top.
dan
Must be an R2004 thing, cuz I don't have it with R2002.
But you can edit the current MNS to show whatever you want in the pulldown, if that's what you mean.
-
mmm i'm running adt 3.3 with acad 2002 actually. the pulldown i'm talking about is located within a viewports toolbar i have. when you are in floating modelspace it allows you to easily set the vpscale but i've always found it annoying that engineering units are on the top. does that help explain it
dan
-
mmm i'm running adt 3.3 with acad 2002 actually. the pulldown i'm talking about is located within a viewports toolbar i have. when you are in floating modelspace it allows you to easily set the vpscale but i've always found it annoying that engineering units are on the top. does that help explain it
dan
Ahhh... must be an ADT thing.
-
^is found in plain A2K-A2K4 also. Right-click in a toolbar belonging to the ACAD menu group and choose the "Viewports" toolbar.
Don't know how to get architectural units on top, though (quite content with having metrics on top here :) )
Added: The viewport scale is a built-in control, but I'm sure with some VB knowledge it can be tweaked or replaced by your own definition?
The menu definition is
ID_VPScale [_Control(_ViewportScale)]
-
^is found in plain A2K-A2K4 also. Right-click in a toolbar belonging to the ACAD menu group and choose the "Viewports" toolbar.
I had the toolbar open and docked but the left end was off screen. duh!
-
Ahhh... must be a CADaver thing. :lol:
-
Old eyes don't work like they used to... 'specially dead ones.
-
I use this a lot here and always wished there were a way to edit it or add to it with in-house scale factors. If you guys do get around to playing with this, I'd be very interested in the results.....
-
yeah it's just another minor annoyance i've always pondered. good to see i'm not the only one :D
dan
-
Here. I did this before 2002 came out. Name the dcl file zoomscale.dcl. You can add whatever you want to it.
//zooms to precise paper space scales
zp : dialog {
label = "Zoom scale";
: boxed_column {
label = "zoom ps";
: list_box {
allow_accept = true;
key = "zoom";
list = " \n1/128\"=1'-0\"\n1/64\"=1'-0\"\n1/32\"=1'-0\"\n1/16\"=1'-0\"\n3/32\"=1'-0\"\n1/8\"=1'-0\"\n3/16\"=1'-0\"\n1/4\"=1'-0\"\n3/8\"=1'-0\"\n1/2\"=1'-0\"\n3/4\"=1'-0\"\n1\"=1'-0\"\n3\"=1'-0\"\n6\"=1'-0\"\nExtents\nPrevious\nAll\nVmax\n.9x\n2x\n.5x";
width = 5;
}
}
ok_cancel;
}
(defun c:zg ()
(setq zoomfactor "0")
(setq zdialog (load_dialog "zoomscale"))
(if (and zdialog (new_dialog "zp" zdialog))
(progn
(action_tile "zoom" "(setq zoomfactor $value)")
(start_dialog)
(cond
((= "0" zoomfactor)
)
((= "1" zoomfactor)
(setq zoomfactor "0")
(command ".zoom" "1/1536xp") ;1/128"=1'-0"
)
((= "2" zoomfactor)
(setq zoomfactor "1")
(command ".zoom" "1/768xp") ;1/64"=1'-0"
)
((= "3" zoomfactor)
(command ".zoom" "1/384xp") ;1/32"=1'-0"
)
((= "4" zoomfactor)
(command ".zoom" "1/192xp") ;1/16"=1'-0"
)
((= "5" zoomfactor)
(command ".zoom" "1/128xp") ;3/32"=1'-0"
)
((= "6" zoomfactor)
(command ".zoom" "1/96xp") ;1/8"=1'-0"
)
((= "7" zoomfactor)
(command ".zoom" "1/64xp") ;3/16"=1'-0"
)
((= "8" zoomfactor)
(command ".zoom" "1/48xp") ;1/4"=1'-0"
)
((= "9" zoomfactor)
(command ".zoom" "1/32xp") ;3/8"=1'-0"
)
((= "10" zoomfactor)
(command ".zoom" "1/24xp") ;1/2"=1'-0"
)
((= "11" zoomfactor)
(command ".zoom" "1/16xp") ;3/4"=1'-0"
)
((= "12" zoomfactor)
(command ".zoom" "1/12xp") ;1"=1'-0"
)
((= "13" zoomfactor)
(command ".zoom" "1/4xp") ;3"=1'-0"
)
((= "14" zoomfactor)
(command ".zoom" "1/2xp") ;6"=1'-0"
)
((= "15" zoomfactor)
(command ".zoom" "e") ;extents
)
((= "16" zoomfactor)
(command ".zoom" "p") ;previous
)
((= "17" zoomfactor)
(command ".zoom" "a") ;all
)
((= "18" zoomfactor)
(command ".zoom" "v") ;vmax
)
((= "19" zoomfactor)
(command ".zoom" ".9x") ;.9x
)
((= "20" zoomfactor)
(command ".zoom" "2x") ;double scale
)
((= "21" zoomfactor)
(command ".zoom" ".5") ;half scale
)
) ;_ cond
;(alert zoomfactor)
) ;_ progn
) ;_ if
) ;_ defun
-
hey daron i'm not that great with dcl yet. how do i go about creating this? do i seperate the first bit of code from the second or put the two together in one file. sounds like what i want but just need a little assistance. thanks a bunch
dan
-
The first code is the dcl file. Name it zoomscale.dcl and put in it's own file in the same folder where you'll put your lisp file. The second code is the lisp as I'm sure you can tell. Put it in its own file and name it whatever you want. I used pszoomscale.lsp. It's really designed for paperspace, but I'm sure it can be modified for both.
-
ok that's what i thought. i made a lisp from the second part so i just have to make dcl of first. so i'll try that and let you know. thanks
dan
-
Just as an FYI, the _Color, _Layer, _Viewport, etc... pulldown controls that are part of AutoCAD are untouchable by either Lisp or VB.
.ARX (lightning crashes and spooky organ music)
-
ARX, fancy that. In December, I'll be taking a class at AU called "ARX for the VBA and lisp programmer." Don't know if it'll help, but we'll see.
-
Check out this version for the rest of the world!
//zooms to precise paper space scales
zp : dialog {
label = "Zoom scale viewports";
: boxed_column {
label = "zoom ps";
: list_box {
allow_accept = true;
key = "zoom";
list ="\n1 to 1\n1 to 2\n1 to 5\n1 to 10\n1 to 20\n1 to 25\n1 to 50\n1 to 100\n1 to 200\n1 to 250\n1 to 500\n1 to 1000\n1 to 1250\n1 to 2500\nExtents\nPrevious\nAll";
width = 50;
height = 20;
}
}
ok_cancel;
}
(defun c:zg ()
(setq zoomfactor "0")
(setq zdialog (load_dialog "zoomscale"))
(if (and zdialog (new_dialog "zp" zdialog))
(progn
(action_tile "zoom" "(setq zoomfactor $value)")
(start_dialog)
(cond
((= "0" zoomfactor)
)
((= "1" zoomfactor)
(setq zoomfactor "0")
(command ".zoom" "1/1xp") ;1 to 1
)
((= "2" zoomfactor)
(command ".zoom" "1/2xp") ;1 to 2
)
((= "3" zoomfactor)
(command ".zoom" "1/5xp") ;1 to 5
)
((= "4" zoomfactor)
(command ".zoom" "1/10xp") ;1 to 10
)
((= "5" zoomfactor)
(command ".zoom" "1/20xp") ;1 to 20
)
((= "6" zoomfactor)
(command ".zoom" "1/25xp") ;1 to 25
)
((= "7" zoomfactor)
(command ".zoom" "1/50xp") ;1 to 50
)
((= "8" zoomfactor)
(command ".zoom" "1/100xp") ;1 to 100
)
((= "9" zoomfactor)
(command ".zoom" "1/200xp") ;1 to 200
)
((= "10" zoomfactor)
(command ".zoom" "1/250xp") ;1 to 250
)
((= "11" zoomfactor)
(command ".zoom" "1/500xp") ;1 to 500
)
((= "12" zoomfactor)
(command ".zoom" "1/1000xp") ;1 to 1000
)
((= "13" zoomfactor)
(command ".zoom" "1/1250xp") ;1 to 1250
)
((= "14" zoomfactor)
(command ".zoom" "1/2500xp") ;1 to 2500
)
((= "15" zoomfactor)
(command ".zoom" "e") ;extents
)
((= "16" zoomfactor)
(command ".zoom" "p") ;previous
)
((= "17" zoomfactor)
(command ".zoom" "a") ;all
)
) ;_ cond
;(alert zoomfactor)
) ;_ progn
) ;_ if
) ;_ defun
You will notice that the box is now large enough to accommodate all of the choices.