• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

definition coordinates

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
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 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.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top