Jump to content

get absolute coordinates of a block reference


Dill

Recommended Posts

hi,

 

i have never done anything with autocad and most likely i never will.

but now i have to write a little script that does the following:

 

find all block references (representing lamps) and

see for each of them if they are in one of the polygons (representing rooms).

 

it is no problem to find the blockrefs, but the insertionPoint of all the lamp blocks is (0,0,0). the blocks geometry seems to be only relative to itself or what!? how can i get absolute coordinates of the blocks so i can determine if a block is inside a polygon?

 

 

 

thank you

Link to comment
Share on other sites

(cdr (assoc 10 (entget (car (entsel "Select the ref.: ")))))

 

Will return a list of co-ordinates of insertion point.

Link to comment
Share on other sites

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...