Angelo2449
Guest
Hello everyone,
with the command :
I define the deduction of the area of which I clicked an internal point and I extract the area of which I write the value in pt2.
I would also like to have the opportunity to write the value of the area at a point calculated outside the figure that inscribes pt1, for example above.
how, if possible, calculate this point?
Thank you.
with the command :
Code:
(defun c:areapc (/ pt1 pt2 area retino stringaout)
(setq pt1 (getpoint "click internal point: ")
(runapp "c:\\autocadsupport\\\\libertytre\\trattcolori.exe "c:\\\autocadsupport\\\libertytre\\\\trattcolori.tkn" :vlax-true)
(setq stringaout (getcliptext)
(if (= end stringout)
(progn)
(alert "interrupted function")
(vl-exit-with-error "exit from the program")
);
);
(command "_bhatch" "_pr" "_s" pt1 ")
(setq retino (entlast))
(command "_area" "_o" "_last")
(if (/= stringaout "no")
(command "_change" retino "_p" "_color" stringaout ")
);
(princ "\narea ")
(seq area)
(setcliptext (rtos area 2 2))
(setq pt2 (getpoint "\nclick the insertion point of the value of the area"))
(command "_text" pt2 0.4 0.0 (strcat "area m2 = " (rtos area 2 2))
(if (/= stringaout "no")
(command "_change" "_last" "_p" "_color" stringaout")
);
(setcliptext (rtos area 2 2))
(if (= "no" stringout)
(command "_erase" retino")
);
);
I would also like to have the opportunity to write the value of the area at a point calculated outside the figure that inscribes pt1, for example above.
how, if possible, calculate this point?
Thank you.