+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Forum Newbie Guiboard's Avatar
    Computer Details
    Guiboard's Computer Details
    Monitor:
    2 x 22" LG Flatron
    Using
    AutoCAD 2009
    Join Date
    Jun 2010
    Location
    Longueuil, Québec, Canada
    Posts
    9

    Default Link Table to Attributes

    Registered forum members do not see this ad.

    Hi everyone,

    I would like to read a table that would be linked with block attributes. Like a table (either AutoCAD or Excel) of fluids with pressure, temperature, flowrate... that I would link to attributes. I tried to insert a field in the attribute, but what I've found in fields are properties like Color/Layer/Column/Rows ... Anyone could help?

    Guiboard

  2. #2
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,137

    Default

    Isn't there a DATAEXTRACTION command in 2009? This command extracts data and sends it to a table or an external file such as an Excel spreadsheet.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

  3. #3
    Forum Newbie Guiboard's Avatar
    Computer Details
    Guiboard's Computer Details
    Monitor:
    2 x 22" LG Flatron
    Using
    AutoCAD 2009
    Join Date
    Jun 2010
    Location
    Longueuil, Québec, Canada
    Posts
    9

    Default

    I know about Data extraction, which extracts block attributes into Excel/AutoCAD table. But is the opposite possible? Extracting data from a table into blocks via fields?

    Edit: I found it by myself! It had to insert a field; Field category - Object // Field names: Formula. There are 4 buttons: Average/Sum/Count/Cell . Using cell I could pick an AutoCAD table cell.

    But I still have 1 question,
    Is there a way to link via an Excel table?
    Last edited by Guiboard; 24th Aug 2010 at 03:03 pm.

  4. #4
    Forum Newbie
    Using
    AutoCAD 2009
    Join Date
    Feb 2011
    Posts
    1

    Default

    hi there

    i am also intrested in the same.
    i have made a VBA code to import data from excel which can be extended for the required purpose

    Code:
    Sub markdupfromxl()
    Dim xlApp As Object
    Dim xlFileName As String
    Dim getval(), getval1() As String
    Dim obj, entRef As AcadBlockReference
    Dim instPt() As Double
    Dim a, b As Integer
    xlFileName = "C:\Documents and Settings\divekark\Desktop\test duplicates.xls"
    Set xlApp = CreateObject("Excel.Application")
    xlApp.Visible = False
    Set xlbook = xlApp.workbooks.Open(xlFileName)
    Set xlSheet = xlbook.Sheets(1)
    a = xlSheet.UsedRange.Rows.Count
    ReDim getval(a), getval1(a)
    For b = 0 To a - 2
    Set myrng = xlSheet.Range("A1")
    getval(b) = myrng.Offset(b + 1, 0).Value
    getval1(b) = myrng.Offset(b + 1, 1).Value
    Set obj = ThisDrawing.HandleToObject(getval(b))
    instPt = obj.InsertionPoint
    Set entRef = ThisDrawing.ModelSpace.InsertBlock(instPt, "flage2", 1#, 1#, 1#, 0)
        If entRef.HasAttributes Then
            Dim AttList As Variant
            ' Build a list of attributes for the current block.
            AttList = entRef.GetAttributes
            ' Cycle throught the list of attributes.
            For j = LBound(AttList) To UBound(AttList)
                If AttList(j).TagString = "FLAGTEST" Then
                    AttList(j).TextString = getval1(b)
                End If
            Next
        End If
    Next
    xlbook.Close
    xlApp.Quit
    Set xlbook = Nothing
    Set xlSheet = Nothing
    ThisDrawing.Activate
    End Sub
    if you tell me some thing more may be i can help you.

  5. #5
    Forum Newbie Guiboard's Avatar
    Computer Details
    Guiboard's Computer Details
    Monitor:
    2 x 22" LG Flatron
    Using
    AutoCAD 2009
    Join Date
    Jun 2010
    Location
    Longueuil, Québec, Canada
    Posts
    9

    Default

    Registered forum members do not see this ad.

    I had a similar post on this forum, which I got an answer.

    http://www.cadtutor.net/forum/showth...data-Via-field

    Thanks for the VBA routine, but I've been using an add-on for solving my problem.

Similar Threads

  1. How to completely delete a table data link
    By drayle in forum AutoCAD Drawing Management & Output
    Replies: 13
    Last Post: 17th May 2013, 11:11 pm
  2. How to you link a table to a Spread Sheet?
    By muck in forum AutoCAD General
    Replies: 2
    Last Post: 1st Sep 2009, 03:49 pm
  3. Excel Table Data Link
    By johnv in forum AutoCAD General
    Replies: 17
    Last Post: 31st Jul 2009, 12:11 am
  4. Edit Table with Data Link
    By Tconn in forum AutoCAD General
    Replies: 4
    Last Post: 25th Sep 2008, 02:20 pm
  5. Link a block to a field to a table
    By powerman in forum AutoCAD General
    Replies: 0
    Last Post: 15th Jun 2006, 04:42 pm

Tags for this Thread

Bookmarks

Posting Permissions

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