Jump to content

Recommended Posts

Posted

(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))

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...