Import multiple blocks with coordinates

Import multiple blocks with coordinates

Anonymous
Not applicable
2,840 Views
4 Replies
Message 1 of 5

Import multiple blocks with coordinates

Anonymous
Not applicable

Hello everyone,

I am a beginner user of autocad, and i have just started working in a design position. my company has a drawing with more than 2500 block in it. I would like to make a Lisp in which i can import the 100 blocks at a time, the blocknames and the coordinates are available in excel sheet, 

 

So what i need is a way to read the blocknames and coordinates from excel sheet and then import them from the master drawing to the drawing i'm working on?

Thanks,

0 Likes
2,841 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Hello @Anonymous  can attach an example from your excel and an example from your .dwg.

0 Likes
Message 3 of 5

leeminardi
Mentor
Mentor

This can be easily done by using Excel concatenate command to create an AutoCAD insert command to create commands to add the blocks.  These links provide examples that in addition to adding the blocks also add attributes and labels.

 

https://forums.autodesk.com/t5/autocad-forum/importing-csv-into-autocad-2018-as-block-and-including-... 

 

https://forums.autodesk.com/t5/autocad-forum/excel-spreadsheet-with-thousands-of-circuit-ref/m-p/807... 

 

lee.minardi
0 Likes
Message 4 of 5

Sea-Haven
Mentor
Mentor

Can you explain more about the 2500 blocks in a dwg sounds like a lot, are they in 1 dwg or was that after your excel input.

 

There may be some smarter ways to doing your blocks. Dynamic blocks come to mind, blocks with attributes rather than hard coded text.

 

Lee-mac has a nice program called "steal.lsp" it does just that copies a block from a dwg, it can be ran as a 1 line of code. Sounds helpful in this case.

 

(Steal "C:\\My Folder\\MyDrawing 2500 blks.dwg" '( ("Blocks" "Block1" "Block2") ) )

0 Likes
Message 5 of 5

pbejse
Mentor
Mentor

@Anonymous wrote:

...my company has a drawing with more than 2500 block in it. I would like to make a Lisp in which i can import the 100 blocks at a time, the blocknames and the coordinates are available in excel sheet, 

 

So what i need is a way to read the blocknames and coordinates from excel sheet and then import them from the master drawing to the drawing i'm working on?


Thats the confusing part, does that mean the 2500 blocks of information were exported to excel from different drawings, and now you need a program to insert the blocks to one file reading the said excel file? or it came from one master drawing

 

As you insinuated, you want to write the lisp. We can help you with that. 

 

Also, if you want to take take the easy way, use  "steal.lsp" from Lee-Mac website as suggested by @Sea-Haven, Otherwise post an example drawing and excel file.

 

0 Likes