Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Block name batch insertion

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
288 Views, 3 Replies

Block name batch insertion

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 .

3 REPLIES 3
Message 2 of 4
leothebuilder
in reply to: Anonymous

How about a field with block name?

Message 3 of 4
Anonymous
in reply to: leothebuilder

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 ??
Message 4 of 4
Kent1Cooper
in reply to: Anonymous


@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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report