How to get Grid values of each inserted blocks in drawing

How to get Grid values of each inserted blocks in drawing

Yamishon_Noah
Enthusiast Enthusiast
1,083 Views
5 Replies
Message 1 of 6

How to get Grid values of each inserted blocks in drawing

Yamishon_Noah
Enthusiast
Enthusiast

Hi,

 

 

Please refer to attachment, I have placed several blocks inside Title Block-Border (Block name: Transmitter Conventional) and given attribute value (ex. 1 to 8) and each block I have placed in different grid (position) in drawing.

 

 

I want to export this grid value against each block inserted in excel.

 

For ex:

 

1 no. valued block placed in grid value C2

 

2 no. valued block placed in grid value D3

 

Similarly all blocks grid values placed in the drawing shall be extracted to excel (Attribute of block and its grid value).

 

I have thousands of blocks with attribute placed in the several drawings which I want to extract.

 

 

Kindly help me to get the same.

 

 

0 Likes
1,084 Views
5 Replies
Replies (5)
Message 2 of 6

Otto
Alumni
Alumni
Hello thegreatkarthik67

It looks like you are looking for information related to datalinking between AutoCAD and Excel. Community members with similar questions found the following article(s) useful:

DATALINK (Command)

To update data links, use the DATALINKUPDATE (Command)

To provide an interface to external database tables use:DBCONNECT (Command).


I'm a software-based HelpBot, designed to provide the information you need to get up and running with Autodesk products—any time, day or night. Your feedback will help train me to deliver more accurate and helpful answers. Thanks in advance! Also, please note that I'm only set up to respond to the first post of a topic, not to any replies. Thank you!

Helpful links: Find Serial Numbers and Product Keys | Find Downloads and Service Packs | Activate Autodesk software
0 Likes
Message 3 of 6

Yamishon_Noah
Enthusiast
Enthusiast

Hi Otto,

 

thanks for your reply,

 

 

Not exactly, I don't want to link excel.. I just need to extract block position (grid value) to excel which inserted in drawing.

 

That grid value shall be as per my title block (row A,B,C... and Column 1,2,3...)

 

 Untitled.jpg

 

 

Thanks,

 

Karthik

0 Likes
Message 4 of 6

swieciakpawel
Advocate
Advocate

Hey,

 

I don't generally use the imperial scale, so I hope You don't mind me making example in milimeters.

 

I'm not really sure if the grid differs in other drawings, or if the grid size is different for each drawing (I assumed the answer - YES).

 

1 - I've moved the grid border to 0,0,0

2 - I've used DATAEXTRACTION to get data from blocks : TYPE, Position X, Position Y  (Excel Tab - "DataImport")

obraz.png

3 - I've made a second tab (Tab - "GridSpec"), with information about Your drawing

obraz.png

4 - I've made a lookup table (Tab - "GridSpec") , that would assign Alphabetical values

obraz.png

5 - On a separate tab, I've created a final table to get results:

obraz.png

 

 

 

 

Considering that You can import data to Excel and prepare Yourself similar Excel, I believe this won't cause many problems.

 

I've done it in less than 10 min, but I hope there was no obvious mistake in the example.

 

 

Kind Regards,
Pawel

 

 

 

Message 5 of 6

Yamishon_Noah
Enthusiast
Enthusiast

Hi Pawel,

 

Thanks lot for your reply,

 

 

This almost solved my question but I have several no. of drawings (more than 100) so every time I don't want to do manually this process.

 

So according to your solution can we make any type of lisp/routine to make this auto?

 

 

Thanks

 

Karthik

 

 

0 Likes
Message 6 of 6

swieciakpawel
Advocate
Advocate

Hey!

 

If You're looking for simple automation, i guess this could be easy if You have only single type of objects that are placed on the grid. Then You could just use a single dxe and run the lisp running a single command.

(command "-DATAEXTRACTION" "C:\\????.dxe" "YES")

 

But for 100 drawings you'll probably be interested in some bulk operations, and here i cannot help You, as I'm not a lisp professional.

Therefore I'd recommend a follow-up question on neighbor section of this forum : https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bd-p/130

 

 

Kind Regards,
Pawel

 

0 Likes