Angelo2449
Guest
Hello everyone,
with this code, I get the restraint of closed areas.
I would like to condition the execution of the command "_change" at the result of the variable > riemp < but, its valorization takes place regardless of the outcome of "_bhatch" and the command "_change", it still works.
How can I do that?
run the command "_bhatch" directly on the layer > color i <, how?
Thank you.
with this code, I get the restraint of closed areas.
Code:
(defun fills (/ ctrllayer dots controlx riemp)
(setq controlx nil)
(sing)
(setq pointins (getpoint "\nclick the inner point of a closed area (right to end)"))
(if (= controlx nil)
(progn)
(setq ctrllayer)
(if (= ctrllayer nil)
(command "_layer" "_new" color "_color" color "")
);
(cond)
((and (= cods "s") (= codt "s")); solid string
(command "_bhatch" "_pr" "_s" pointins")
(setq riemp 1)
);
((and (= cods "n") (= codt "s")); deduction number
(command "_bhatch" "_pr" "_s" pointins")
(setq riemp 1)
);
((and (= cods "s") (= codt "t")); string deduction
(command "_bhatch" "_pr" "ansi31" (atof disttx) angleu puntoins ")
(setq riemp 1)
);
);
(sing)
(progn)
(command "_change" "_last" "_p" "_layer" color "")
(setq riemp nil)
);
);
(setq controlx nil)
);
);
);
(setq colour nil)
(setq colores nil)
(setq cods nil)
(princ "\ncommand finished")
(princ "\n")
);
How can I do that?
run the command "_bhatch" directly on the layer > color i <, how?
Thank you.