Block name batch insertion

Block name batch insertion

Anonymous
Not applicable
343 Views
3 Replies
Message 1 of 4

Block name batch insertion

Anonymous
Not applicable

hi all.

I have a series of dxfs wich i insert in a dwg as blocks.

I want to know if there is a easy way to insert the block name in the middle of each block bounding box.

Thanks in advance .

0 Likes
344 Views
3 Replies
Replies (3)
Message 2 of 4

leothebuilder
Advisor
Advisor

How about a field with block name?

0 Likes
Message 3 of 4

Anonymous
Not applicable
How do i do it??.the goal was to automate the process . Is there a lisp somewhere to start with ??i want to do it one time after all the blocks(dxf) insertions ??
0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

@AsramiOsram wrote:

....

I want to know if there is a easy way to insert the block name in the middle of each block bounding box. ....


There's a routine called LabelBlockUnder.lsp here that does it under Blocks.  [There are also other suggestions on that thread.]  Search it for all instances of "Your" as part of a term, and give it appropriate content.  I think it should do what you're asking if you replace its Text-command function with this:

 

(command
  "_.text"
  "_mc"

  (mapcar '/ (mapcar '+ (vlax-safearray->list minpt) (vlax-safearray->list maxpt)) '(2 2 2))

    ;; [above line calculates middle of bounding box]
  "" ; omit this line if YourTextStyle has fixed height
  0
  (vlax-get blockobj 'Name)
); command

Kent Cooper, AIA