Convert text into an attribute and import it to a block via a LISP routine

Convert text into an attribute and import it to a block via a LISP routine

Anonymous
Not applicable
8,461 Views
20 Replies
Message 1 of 21

Convert text into an attribute and import it to a block via a LISP routine

Anonymous
Not applicable

Good evening everyone...

 

I have an issue and I think LISP could help me....it is my last hope to save hours of work time.....

A company has handed over various drawings that contain blocks but the information related to the blocks is written either in text or mtext format... So when I try to extract the data so that I can handle it in a csv file I have absolutely no connection between the text and the block. 

What I would like to do is run a lisp that can select the text which is closest to a block (with proximity or relative distance criteria), convert it to an attribute and then integrate it to that block. 

Is this even possible?

In an attempt to make it more clear, I have attached a screenshot. Currently I have block "X" with no information and some adjacent text (REC22). I want the lisp to integrade the REC22 text to block with a tag that can be predefined by me (i.e. DESC_1) and insert the text as an attribute value.

 

0 Likes
Accepted solutions (2)
8,462 Views
20 Replies
Replies (20)
Message 21 of 21

Mohamed_ArfinCMA9E
Observer
Observer

Hi,

 

your code works really great, appreciate your effors and knowledge. But it creating the duplicate block with attribute and when i sync the block the attributes disappear. Can you please edit the code so that instead of duplicating the block, it will merge with the nearby block as attribute

 

0 Likes