0 Members and 1 Guest are viewing this topic.
(defun C:AP2 ( / a e1 ar ptx Text)(print)(setq a (getpoint "\nSelect Internal Point: "))(command "-Boundary" a "")(setq e1 (entlast))(command "_pedit" e1 "_C" "")(setq ar (vlax-curve-getarea e1))(command "-ERASE" e1 "")(setq ptx (getpoint "\n select point "))(setq Text (strcat "s.n. = " (rtos ar 2 2) " mq"))(command "-text" ptx "0.15" "0" Text)) (vl-load-com) (princ)
(defun C:AP2 ( / a e1 ar ptx Text) (vl-load-com) (setvar "cmdecho" 0) (command "_undo" "_begin") (print) (setq a (getpoint "\nSelect an Internal Point: ")) (command "_.Boundary" a "") (setq e1 (entlast));;; (command "_.pedit" e1 "_C" "") ;;; I donīt think you need this (setq ar (vlax-curve-getarea e1)) (command "_.ERASE" e1 "") (setq ptx (getpoint "\n select point ")) (setq Text (strcat "s.n. = " (rtos ar 2 2) " mq")) (command "_.text" "j" "mc" ptx "0.15" "0" Text) (command "_undo" "_end") (princ))
(setq obj (vlax-ename->vla-object (entlast))) ; do after bpoly or boundary(setq ptx (osnap (vlax-curve-getStartPoint obj) "gcen"))
(command "_.text" "j" "mc" ptx "0.15" "0" Text)
(command "_.layer" "n" "Text_area" "c" "2" "Text_area" "l" "Continuous" "Text_area" "s" "Text_area" "")