if else statement inside cond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear forum members,
I have a small routine with dcl to plot some dwg
Now I need an if else statement as overlay of an cond
If in my dcl menu button x is selected take over all the settings and do something
If the same button is not selected do something else
Here is my code ( below is more text to explain!!)
(if(= ddiag 2)
(progn
;(princ "\n Using Radio_column data...You chose ")
(cond
((= Choice3 "12")
(progn
(c:my_plot)
);end progn
) ; end choise
((= Printer "1")
(progn
(princ "You selected the System printer")
(if (= choice1 "7")(c:A3))
(if (= choice1 "8")(c:A4L))
(if (= choice1 "9")(c:A4P))
(if (= choice2 "10")(c:Pr-A3L))
(if (= choice2 "11")(c:Pr-A4L))
(setvar "cmdecho" oldcmdecho)
);end progn
) ; end Printer1
((= Printer "2")
(progn
(princ "You selected the DWG To PDF printer")
(if (= choice "4")(c:PDFA0))
(if (= choice "5")(c:PDFA1))
(if (= choice "6")(c:PDFA2))
(if (= choice1 "7")(c:PDFA3))
(if (= choice1 "8")(c:PDFA4L))
(if (= choice1 "9")(c:PDFA4P))
(if (= choice2 "10")(c:PDF-A3L))
(if (= choice2 "11")(c:PDF-A4L))
(setvar "cmdecho" oldcmdecho)
);end progn
) ; end Printer2
((= Printer "3")
(progn
(princ "Are you sure you wanna have TIF?")
;(command "script" scr ) nice way to make temp scr files to execute LOL
;(alert "Still to be implemented")
(command "script" "AlgemeenTIFF.SCR")
(setvar "cmdecho" oldcmdecho)
);end progn
) ; end printer3
) ;end cond
) ;end progn
) ;end if ddiag
What I want is that when Choice3 is selected It needs to skip Printer 1 / 2 and 3
When Choice3 is not selected is needs to do Printer 1 / 2 and 3 and skip Choice3
I hope I am not to confusing with this
Code can be changed in any way as long as it will work lol
I broke my head on this one so far
Kind regards,
Kind Regards