Angelo2449
Guest
Hello everyone,
in this code, the command > if < does not work as it should, in fact, instead of selecting the current case, passes them all!
the variable > typedrone < is valued exactly as "zoom ", "pro" and "manual".
Perhaps I observe it too, obviously the solution is there, under the nose!
Thank you.
in this code, the command > if < does not work as it should, in fact, instead of selecting the current case, passes them all!
the variable > typedrone < is valued exactly as "zoom ", "pro" and "manual".
Perhaps I observe it too, obviously the solution is there, under the nose!
Thank you.
Code:
; @quadro
(defunct picture (/ tipodrone pa pb pc pd x2 y2 beta alpha range x1 y2 y2 xb yb xc xd yd)
(runapp "c:\\autocadsupporto\\\\libertytre\\\\\\\\sceltadrone.tkn" :vlax-true)
(setq tipodrone (getcliptext)
(if)
(progn)
(runapp "c:\\autocadsupporto\\\libertytre\\\\interrupted function.exe "c:\\\\autocadsupport\\\\\\\\\interrupted function.tkn" :vlax-true)
(vl-exit-with-error "exit from the program")
);
);
(princ "\n")
(princ "typedrone > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > )
(princ tipodrone)
(princ)
(princ "\n")
if (= typedrone "zoom")
(progn)
(setq pa (getpoint "\nclicca il primo punto - zoom (vertice alto a sinistra))))
(setq pb (getpoint "\nclicca il secondo punto - zoom (vertice alto a right))))
);
end if
if (= typedrone "pro")
(progn)
(setq pa (getpoint "\nclicca il primo punto - pro (vertice alto a sinistra))))
(setq pb (getpoint "\nclicca il secondo punto - pro (vertice alto a right))))
);
end if
if (= "manual" typedrone)
(progn)
(setq pa (getpoint "\nclicca il primo punto - Manual (vertice alto a sinistra))))
(setq pb (getpoint "\nclicca the second point - manual (low right turn)"))
);
end if
(seq alpha (angle pa pb))
(setq beta (- pi alpha))
(setq x2 (* 45.00 (cos alpha)))
(setq y2 (* 45.00)
(setq y1 (* 32.00 (cos beta)))
(setq x1 (* 32.00)
(setq xd (+ (car pa) x1))
(setq yd (+ (cadr pa) y1))
(setq pd)
(setq xc (+ (car pd) x2))
(setq yc (+ (cadr pd) y2))
(setq pc)
(setq xb (+ (car pa) x2))
(setq yb (+ (cadr pa) y2))
(setq pb (list xb yb))
(command "_pline" pa pb pc pd pa ")
);