TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: georgecorbett on October 03, 2021, 10:22:42 PM
-
REMOVED
EDIT (John): removed spam.
-
Made this real quick to insert the area of an object. should give you a starting point.
(defun C:Obj_Area (/ ent objid pt hgt str)
(vl-load-com)
(setq ent (entsel "\nSelect Object"))
(setq objid (vla-get-ObjectId (vlax-ename->vla-object (car ent))))
(setq pt (getpoint "\nSelect Point"))
(setq hgt 0.250)
(setq str (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa objid) ">%).Area>%"))
(entmake (list (cons 0 "TEXT")
(cons 10 pt)
(cons 40 hgt)
(cons 1 str)
)
)
(princ)
)
-
If you pick say a existing text as destination you make a new STR as per mhupp then use vla-put-textstring obj to update it.
-
Perhaps one of these will help you:
Copy Field (http://lee-mac.com/copyfield.html)
Match Field Formatting (http://www.lee-mac.com/matchfieldformatting.html)