See the top rated post in this thread. Click here

Results 1 to 3 of 3

Thread: Data Extraction of Specific Block Attributes to Existing Excel Sheet

  1. #1
    Member
    Join Date
    2017-10
    Posts
    15
    Login to Give a bone
    0

    Question Data Extraction of Specific Block Attributes to Existing Excel Sheet

    Hello,

    I have an AutoCAD Drawing with different Blocks. These blocks have some of the attributes names in common (Height, Length & Width).

    Can I extract the attribute data from selected area in drawing to an existing excel sheet with standard template such that the block name comes under column named "Block Name", Value of Height Attribute comes under column "Height" and so on?

    Here are the list of things I wanted to do in attached drg
    1. Extract data from some blocks (Block Names are: SA GRILLE, SA Slot Diffuser, SA Sq Diffuser, Shoe Piece, Straight Duct, Transition, Elbow) from selected area on drg.
    2. Extract the values of Attributes named WIDTH, HEIGHT, WIDTH2, HEIGHT1 & LENGTH
    3. The Data should be extracted to an existing excel sheet as attached.
    4. The data extracted should come under respective column label.

    Is this feasible using VBA?

    Here are some links which are helpful but I couldn't get desired results using those.
    http://www.lee-mac.com/macatt.html
    http://www.cadtutor.net/forum/showth...ing-excel-file

    Attachments:
    Dynamic Blocks Data.xlsx
    Dynamic Blocks.dwg

  2. #2
    All AUGI, all the time
    Join Date
    2003-07
    Posts
    555
    Login to Give a bone
    0

    Default Re: Data Extraction of Specific Block Attributes to Existing Excel Sheet

    2 answers
    1 look at other post at Cadtutor
    2 using VBA you can simply get at the attributes

    3rd there is VBA to excel examples out there just Google

    Code:
    Set SS = ThisDrawing.SelectionSets.Add("pit1sel")
    SS.Select acSelectionSetAll, , , FilterDXFCode, FilterDXFVal
    
    For Cntr = 0 To SS.Count - 1
    If SS.Item(Cntr).Name = BLOCK_NAME Then
       attribs = SS.Item(Cntr).GetAttributes
         If attribs(0).TextString = pitname Then

  3. #3
    Member
    Join Date
    2013-02
    Posts
    13
    Login to Give a bone
    1

    Default Re: Data Extraction of Specific Block Attributes to Existing Excel Sheet

    Quote Originally Posted by sbmunde View Post
    Hello,

    I have an AutoCAD Drawing with different Blocks. These blocks have some of the attributes names in common (Height, Length & Width).

    Can I extract the attribute data from selected area in drawing to an existing excel sheet with standard template such that the block name comes under column named "Block Name", Value of Height Attribute comes under column "Height" and so on?

    Here are the list of things I wanted to do in attached drg
    1. Extract data from some blocks (Block Names are: SA GRILLE, SA Slot Diffuser, SA Sq Diffuser, Shoe Piece, Straight Duct, Transition, Elbow) from selected area on drg.
    2. Extract the values of Attributes named WIDTH, HEIGHT, WIDTH2, HEIGHT1 & LENGTH
    3. The Data should be extracted to an existing excel sheet as attached.
    4. The data extracted should come under respective column label.

    Is this feasible using VBA?

    Here are some links which are helpful but I couldn't get desired results using those.
    http://www.lee-mac.com/macatt.html
    http://www.cadtutor.net/forum/showth...ing-excel-file

    Attachments:
    Dynamic Blocks Data.xlsx
    Dynamic Blocks.dwg
    Check out the Excel workbook in this post - http://forums.augi.com/showthread.ph...xtraction-Tool

    Should be an excellent starting point for your project.

Similar Threads

  1. 2013: Batch extraction of title block attributes to excel
    By robechandler167079 in forum AutoCAD General
    Replies: 1
    Last Post: 2015-04-28, 07:29 PM
  2. 2014: Data Extraction Table not Updating to the Excel Sheet
    By JHARSH in forum ACA General
    Replies: 0
    Last Post: 2014-08-05, 08:55 PM
  3. Replies: 2
    Last Post: 2012-06-06, 12:28 PM
  4. dynamic block with attributes extraction to excel
    By parkerfeldman in forum AutoLISP
    Replies: 8
    Last Post: 2009-01-27, 09:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •