LumpoDelMagnifico
Electrical
- Sep 22, 2004
- 35
I am trying to determine if a drawing is longer Vertically than it is Horizontally. If it is I want to rotate the drawing by 90 degrees.
Does anyone have any idea how to check the max dimensions using VBA and then how to rotate the drawing?
I used to do this in Lisp using the following
(setq mx (getvar "extmax"))
(setq mn (getvar "extmin"))
(setq width (- (nth 0 mx) (nth 0 mn)))
(setq height (- (nth 1 mx) (nth 1 mn)))
(if (> height width)
(command "rotate" "all" "" "0,0" "90")
)
(command "Zoom" "E")
I would like to do the exact same thing. Barring that I would like to just run this chunk of LISP code from VBA if that is possible.
Does anyone have any idea how to check the max dimensions using VBA and then how to rotate the drawing?
I used to do this in Lisp using the following
(setq mx (getvar "extmax"))
(setq mn (getvar "extmin"))
(setq width (- (nth 0 mx) (nth 0 mn)))
(setq height (- (nth 1 mx) (nth 1 mn)))
(if (> height width)
(command "rotate" "all" "" "0,0" "90")
)
(command "Zoom" "E")
I would like to do the exact same thing. Barring that I would like to just run this chunk of LISP code from VBA if that is possible.