Page 3 of 3 FirstFirst 123
Results 21 to 25 of 25

Thread: Copy text strings from AutoCAD into Excel

  1. #21
    Member
    Join Date
    2008-02
    Posts
    49
    Login to Give a bone
    0

    Default Re: Copy text strings from AutoCAD into Excel

    Quote Originally Posted by fixo View Post
    Glad to help
    Cheers
    Hi Fixo, may you help me again in another little issue ?
    I would like to use SelectionSets command to check the presence of a table inside the drawing.
    Of course may there was a shortcut way, selecting all the object inside the DWG and check which of one is a Table, but I prefer to use the below code, but I don't know the correct dxf code.
    Pls could you look at my code and suggest me something ?

    Thank you

    Code:
      Dim intCode(0 To 1) As Integer
      Dim varData(0 To 1) As Variant
      
      intCode(0) = 0:  varData(0) = "ACAD_TABLE"
      intCode(1) = 2:  varData(1) = "*"
    
      ThisDrawing.SelectionSets.Add ("BOM")
      Set Ssnew = ThisDrawing.SelectionSets("BOM")
      Ssnew.Select acSelectionSetAll, , , intCode, varData

  2. #22
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Copy text strings from AutoCAD into Excel

    I think you could not be able to do it this way
    coz dxf code 2 is for block name (certainly the table is
    anonimous block) this name is generates by Autocad
    and looks like *T[numeric part]
    but you can select table say with exact number of row and columns
    Dxf code for rows and coumns must be:
    91 . 10 ' <--10 rows as I remember ir
    92 . 5 '<-- 5 columns
    or with youe variables:
    Code:
     Dim intCode(0 To 2) As Integer
      Dim varData(0 To 2) As Variant
      
      intCode(0) = 0:  varData(0) = "ACAD_TABLE"
      intCode(1) = 91:  varData(1) = 10
      intCode(2) = 92:  varData(2) = 5
    You can eliminate even part, say for any number of rows with 5 columns
    Code:
      intCode(0) = 0:  varData(0) = "ACAD_TABLE"
      intCode(1) = 92:  varData(1) = 5
    Sorry I can't explain more, I'm very busy with my own,
    so it's just a quick shot, see dxfcodes for tsble in the help file
    Last edited by fixo; 2011-07-06 at 12:24 PM. Reason: spell check

  3. #23
    Member
    Join Date
    2008-02
    Posts
    49
    Login to Give a bone
    0

    Default Re: Copy text strings from AutoCAD into Excel

    Thank you for your time it's enough for me ! pls do not waste your time !.
    Thanks a lot, I'll try !.

    Regards

  4. #24
    AUGI Addict fixo's Avatar
    Join Date
    2005-05
    Location
    Pietari, Venäjä
    Posts
    1,269
    Login to Give a bone
    0

    Default Re: Copy text strings from AutoCAD into Excel

    You're welcome
    Cheers

  5. #25
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Default Re: Copy text strings from AutoCAD into Excel

    Quote Originally Posted by fixo View Post
    Don't forget to add references and change
    Excel file name inside the code
    [/CODE]
    What reference would that be?

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Macro to copy data from Autocad to Excel
    By jayabalan1003695339 in forum VBA/COM Interop
    Replies: 1
    Last Post: 2015-05-29, 10:33 PM
  2. Entering text from excel into autocad
    By mbrandt5 in forum VBA/COM Interop
    Replies: 0
    Last Post: 2015-03-27, 12:51 PM
  3. 2015: IS IT POSSIBLE TO COPY TEXT FROM AUTOCAD INTO AN EXCEL SHEET ???
    By doyle.84974 in forum AutoCAD General
    Replies: 3
    Last Post: 2015-02-05, 12:50 PM
  4. text strings on schedules?
    By timsea81 in forum Revit MEP - General
    Replies: 1
    Last Post: 2009-05-08, 04:30 PM
  5. Replies: 1
    Last Post: 2006-10-29, 07:09 PM

Posting Permissions

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