Really simple code below to check if a view "Master_RM" exists, if it does make another view "MASTER" at PT1 PT2.
(defun c:foo1
( / VDM PT1 PT2
)
(setq pt1 '
(0.0 0.0);;Master view pt2 '(34.0 22.0)
);;this should go inside the (if...statement
(command "-view" "window" "MASTER" pt1 pt2
) ;;)
);;if
);;defun
Why does it work if I use this...
but if I use...
it doesn't?
So eventually I need to create a dialog box driven option for the user or use
to achieve this using the code below...
Obviously missing error check and the usual suspects. This is to test the premise.
(defun C:PPD_Views
( / PT1 PT2 PT3 PT4 PT5 PT6 PT7 PT8 PT10 PT11 PT12 PT13 PT14 PT15 PT16 PT9
) (setq pt1 '
(0.0 0.0);;Master view pt2 '(34.0 22.0)
pt3 '(0.0 25.0);;Master_rm view
pt4 '(0.0 47.0)
pt5 '(37.0 0.0);;INSTALL_1
pt6 '(71.0 22.0)
pt7 '(37.0 25.0);;INSTALL_1RM
pt8 '(71.0 47.0)
PT9 '(74.0 0.0);;INSTALL_2
PT10 '(108.0 22.0)
pt11 '(74.0 25.0);;INSTALL_2RM
pt12 '(108.0 47.0)
pt13 '(111.0 0.0);;INSTALL_3
pt14 '(145.0 22.0)
pt15 '(111.0 25.0);;INSTALL_3RM
pt16 '(145.0 47.0)
)
(command "-view" "window" "MASTER" pt1 pt2
) (command "-view" "window" "MASTER_RM" pt3 pt4
) (command "-view" "window" "INSTALL_1" pt5 pt6
) (command "-view" "window" "INSTALL_1RM" pt7 pt8
) (command "-view" "window" "INSTALL_2" pt9 pt10
) (command "-view" "window" "INSTALL_2RM" pt11 pt12
) (command "-view" "window" "INSTALL_3" pt13 pt14
) (command "-view" "window" "INSTALL_3RM" pt15 pt16
) (command "-layout" "t" "STA_CTL_PPD_Plot.dwt" "*") )
Thanks in advance. Happy Mother's day to all you mothers and your mothers.