;Überträgt die Fläche einer Polylinie in ein zu wählendes Blockattribut ;nach Forenbeiträgen auf www.cad.de ;Blockattribut muss sichtbar sein, also am besten mit dummy-Wert versehen ; ;Thanx to cadwiesel :-) angepasst by nebuCADnezzar ; (defun c:fl_att (/ pl att fl) (setq pl (car(entsel "\nPolygon wählen: ")) att (car(nentsel "\nZielattribut wählen: ")) ) (entmod (subst (cons 1 (:field-makeObjectRefText(vlax-ename->vla-object pl)'Area)) (assoc 1 (entget att)) (entget att) ) ) (entupd (cdr(assoc 330 (entget att))));** <- gefaehrlich (princ) (command "REGEN") ) (defun :field-makeObjectRefText (#object #property / ) (if (vlax-property-available-p #object #property) (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa(vla-get-ObjectID #object)) ">%)." (vl-princ-to-string #property) " \\f \"%lu2%pr2\>%" "mm²" ;mit "prX" kann die Anzahl der Nachkommastellen eingestellt werden ) (strcat "##"(vl-princ-to-string #object)"."(vl-princ-to-string #property)"##") ) )