How can I determine the Wall that a Door is Attached to?

How can I determine the Wall that a Door is Attached to?

Anonymous
Not applicable
513 Views
1 Reply
Message 1 of 2

How can I determine the Wall that a Door is Attached to?

Anonymous
Not applicable

Using autolisp if I have a AEC Ddoor selected I need to find the AEC Wall the door is attached to (assumed it IS attached).  Anyone have the code to get this info?

 

I don't see a door property that points to the wall, using  'vlax-get-property'.

 


Thanks,

0 Likes
514 Views
1 Reply
Reply (1)
Message 2 of 2

dbroad
Mentor
Mentor

Gary,

LISP is not the right tool to work with AEC objects.  Most of the properties and methods are not exposed via LISP.  Most of the relationships between parts and pieces are via reactors.  If you really want to work with AEC object, you need to go over to the .NET newsgroup, the objectarx newsgroup, or to the AutoCAD Architecture Customization newsgroup.

 

This shows you in part, the kind of maze, the relationship between walls and doors are:

(setq wall (entget (car(entsel))) ;;wall
      acdbad (entget(cdr(assoc 330 wall))) ;;acdbassocdependency
      acdbac (entget(cdr(assoc 330 acdbad))) ;;acdbassoaction
      acasdi (entget(cdr(assoc 330 acdbac))) ;;acdbassocnetwork
      acanc (entget(cdr(assoc 330 acasdi)))  ;;dict: acad_assocnetwork
      acopng (entget(cdr(assoc 330 acanc)))  ;;dict: assoc_anchor
      acobtw (entget(cdr(assoc 330 acopng)))  ;;aec_anchor_openingbase_to_wall
      door (cdr(assoc 330 acobtw)))

 

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