korg Posted March 12, 2009 Share Posted March 12, 2009 what string tells one defun to call another? (defun norm() (if(= opt7 T) (command "-plot" "N" "" "normal" "" "no" "yes" ""(command "zoom" "e")) (ELSE LOAD NORM2))) norm is a button inside a dialog, if opt7 = nil then load the next dialog named norm2 Quote Link to comment Share on other sites More sharing options...
jammie Posted March 12, 2009 Share Posted March 12, 2009 Hey Krod, By dialog boxes, do Norm & Norm2 use DCL files? The If statement should be able to handle the both options (defun norm() ;if the value for opt7 is not nil (if opt7 ;==== Positive test result ==== ;;progn is requied if you wish to carry out ;;multiple commands for a positive or negative if (progn (command "-plot" ...) (command "zoom" "e") ) ;==== Negative test result ==== ;;Run "norm2" is opt7 is nil (norm2) ) ) what string tells one defun to call another? When you define a function using the (defun norm ()...) the symbol naming the function, in this case "norm" can be called from another function by enclosing it in brackets ;==== Negative test result ==== ;;Run "norm2" is opt7 is nil (norm2) In the above sample the routine norm2 is run from inside the function norm Hope this is makes some sense Jammie Quote Link to comment Share on other sites More sharing options...
korg Posted March 12, 2009 Author Share Posted March 12, 2009 yes they use a dcl file. here is the lisp, it locks up autocad when I run it and select "plot normal" button. should I search for the page set-up inside the norm function? qpt4.LSP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.