CAD Forums > Vertically Challenged
Creating a Routine for Civil3D zoomtosectionview
(1/1)
MSTG007:
I have been messing around with trying to write a command with the C:zoomtosectionview in it. I am trying to figure how I can ask if I want to have two model tiles or single, then activate the zoomtosectionview command. The below will automatically activate the two tiles.
--- Code: ---(defun C:Z2SL () ;Zoom to Sample Line with two model tiles
(setvar "cmdecho" 1)
(ai_tiledvp 2 "_V")
(command "zoomtosampleline")
(command "_AeccStationTrackerAll")
(setvar "cmdecho" 0)
(princ)
)
--- End code ---
The other question I have, is if the two tiles are activated, it would know not to run that part of the code.
Again, thanks for the ideas and help.
Jeff_M:
--- Code - Auto/Visual Lisp: ---(setq doc (vla-get-activedocument (vlax-get-acad-object)) vps (vla-get-viewports doc) count (vla-get-count vps) )(if (= 1 count) (progn ;;only 1 viewport displayed ) (progn ;;more than 1 viewport displayed ) )
MSTG007:
Thank you Jeff for the direction! Much Appreciated!
Navigation
[0] Message Index
Go to full version