Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to associate a field to an object

2 REPLIES 2
Reply
Message 1 of 3
tcorey
1142 Views, 2 Replies

How to associate a field to an object

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
2 REPLIES 2
Message 2 of 3
dbroad
in reply to: tcorey

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.
Message 3 of 3
paullimapa
in reply to: tcorey

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report