All,
I am trying to create a routine that will allow a user to setq for a value by using one of several functions, then pass that variable on to another function and complete a series of steps. My ultimate goal is to have users initiate commands, then create layers, adding a different discipline designator based on the command that they initiate. I know that I should set all the variables as local if possible, yet any time I try to do that, I don't get the result I need. I also tried to nest one function inside the other, but couldn't get it to run.
The code below does run, but I am concerned about the fact that none of the variables are local.
Any suggestions are appreciated.
Thanks,
Jeff
Code:(defun c:settinga (/) (setq parta "V") ) (defun c:settingb (/) (setq parta "VC") ) (defun newlayer (parta /) (setq partb '("-0001" "-0002" "-0003" "-0004" "-0005" ) ) (setq lcount (length partb)) (setq lnext 0) (repeat lcount (setq partbcurrent (nth lnext partb)) (setq final (strcat parta partbcurrent)) (princ final) (setq lnext (+ 1 lnext)) ) ) ;end defun (newlayer parta)