Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

How to associate a field to an object

tcorey
Mentor

How to associate a field to an object

tcorey
Mentor
Mentor

Once I have manually created a field and linked it to an object, area of a polyline, for example, two questions arise:

 

How do I figure out to which object a field is associated and if I copy the field, how do I associate it to a different object?

 

I'm not looking for you to write it for me, but if anyone knows what properties or methods I should be looking at...

 

Tim

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
0 Likes
Reply
1,173 Views
2 Replies
Replies (2)

dbroad
Mentor
Mentor

The objectid, an activeX property.  Point the copied field to another objectid.  The new object should of course have the same object type.

Architect, Registered NC, VA, SC, & GA.

paullimapa
Mentor
Mentor

I found this neat little routine on-line (I forgot where) which would highlite the object a Field is linked to:

;; lslnk.lsp highlites object linked to field
(defun c:lslnk (/ obj d-lst)
;; select a text containing a field
(princ"\nSelect Area Object to Show Link...")(princ)
(setq obj (car (nentsel)))
;; get its data list
(setq d-lst (entget obj))
(if (cdr (assoc 360 d-lst))
(progn
;; highlighting the linked object
(princ"\nLinked Object is Highlited.")(princ)
(redraw
(cdr(assoc 331 (entget(cdr(assoc 360 (entget(cdr(assoc 360 (entget(cdr(assoc 360 (entget (cdr (assoc 360 d-lst))))))))))))))
3
)(princ)
(command"_.List")
(princ"\nHit Enter to Finish Command.")
(while (= 1 (logand 1 (getvar 'CMDACTIVE))) (command pause))
(redraw
(cdr(assoc 331 (entget(cdr(assoc 360 (entget(cdr(assoc 360 (entget(cdr(assoc 360 (entget (cdr (assoc 360 d-lst))))))))))))))
4
)(princ)
)
(progn(princ"\nObject Selected Has No Links.")(princ))
) ; if
)
(princ"\nLsLnk command loaded.")(princ)
; defun

 

 

Area Object Link | Attribute Modifier | Dwg Setup | Feet-Inch Calculator
Layer Apps | List on Steroids | VP Zoom Scales | Exchange App Store


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos