select hatch/object from linked table data

select hatch/object from linked table data

mhdalshalabi
Participant Participant
992 Views
5 Replies
Message 1 of 6

select hatch/object from linked table data

mhdalshalabi
Participant
Participant

hi 

 

is there any way to select the hatch from the table to which I linked the area previously to it using (field - object - area)

 

because I have a big table for room areas with over 250 cells all of them are linked to specific hatch

0 Likes
Accepted solutions (1)
993 Views
5 Replies
Replies (5)
Message 2 of 6

cadffm
Consultant
Consultant

Ootb not, but with a tool it is possible.

Sebastian

0 Likes
Message 3 of 6

mhdalshalabi
Participant
Participant
Okay, so do you know any tool can do that?
0 Likes
Message 4 of 6

Ed__Jobe
Mentor
Mentor

@mhdalshalabi wrote:
Okay, so do you know any tool can do that?

That's something you need to program. You can use lisp, VBA or .NET. You can get the object id that the field links to and then use that to select the hatch.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 5 of 6

mhdalshalabi
Participant
Participant
oh thank you

but I don't know how to code. one thing u can help me with, can u write a description for the process so I can use it to let chatGPT make the lisp for me?

I would be grateful if u can
0 Likes
Message 6 of 6

mhdalshalabi
Participant
Participant
Accepted solution

I get the lisp from a user on reddit many thanks to him 

 

the code zoom and select the object from the linked field on the table.

 

 

(defun c:go ( / entinfo)
 (setq entinfo (entget (CAR (NENTSEL "Select Object to identify parent:"))))
 (defun get331 ( alst / )
  (setq alst (entget (cdr (assoc 360 alst))))
  (if (not (assoc 331 alst))(get331 alst)(cdr (assoc 331 alst))))
 (if (assoc 360 entinfo)
  (progn
   (vl-cmdf "_zoom" "object" (get331 entinfo) "")
   (command "_select" (get331 entinfo)))
 (princ "\nObject does not contain a field.")
)
(princ)
)

 

 

0 Likes