REGHUYES Posted January 8, 2018 Posted January 8, 2018 (defun c:test(/ tab ent Obj pt tObj row col) (vl-load-com) (if (and (setq tab (car (entsel "\nSelect Table: "))) (eq "ACAD_TABLE" (cdr (assoc 0 (entget tab))))) (while (and (setq ent (car (entsel "\nSelect Object: "))) (vlax-property-available-p (setq Obj (vlax-ename->vla-object ent)) 'Area)) (while (progn (setq pt (getpoint "\nClick into Cell to place field: ")) (cond ((vl-consp pt) (if (eq :vlax-true (vla-hittest (setq tObj (vlax-ename->vla-object tab)) (vlax-3D-point pt) (vlax-3D-point (trans '(0 0 1) 0 1)) 'row 'col)) nil (princ "\n** No Cell Selected **"))) (t (princ "\n** No Point Selected **"))))) (vla-setText tObj row col (strcat "% (vl-princ-to-string (vla-get-Objectid Obj)) ">%).Area \\f \"%lu2%pr2%ps[, Sq m]\">%"))) (princ "\n** No Table Selected **")) (princ)) Quote
SLW210 Posted January 8, 2018 Posted January 8, 2018 Please read the Code Posting Guidelines and edit your Code to be included in Code Tags.[NOPARSE] Your Code Here[/NOPARSE] = Your Code Here Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.