Results 1 to 9 of 9

Thread: Import information from an Excel file into Title Block information

  1. #1
    Member
    Join Date
    2006-11
    Posts
    11
    Login to Give a bone
    0

    Question Import information from an Excel file into Title Block information

    I was curious to know if there is a way to reference information (building address, architect, building name, etc.) from an excel file and have the information drawn into a Title Block in the layout of a drawing. This way I wont have to create an individual layout for each of the 300 hundred buildings I recently converted from Microstation. Any Script or Lisp?

  2. #2
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,197
    Login to Give a bone
    0

    Default Re: Import information from an Excel file into Title Block information

    Check this thread, he gave me permission to modify it, so I have attached the program as well as the txt file, we tried excel, but it seemed a little too complicated


    instructions for use might also be of help, the program will probably have to be modified so it doesnt use the X number (it is our method of naming files) If you need further assistance with this, let me know and hopefully I can modify it to fit your specific needs

    Procedure for using AutoTitle Information

    When a project is created, copy DWGPROPS.TXT into the x-folder for the project

    Rename the copy of DWGPROPS.TXT to the X number, using a capital X####



    The file has the field name, a tab, and a space

    Replace the space with the information you wish to use

    If there is information that you do not need, do not erase the extra items, just leave them as they are.



    If you erase the space, or any of the fields in the list #### or ---- will show up in the title block of the drawing when it is opened.





    Attached Files Attached Files
    Last edited by ccowgill; 2007-01-05 at 12:17 PM. Reason: instructions for use

  3. #3
    All AUGI, all the time Avatart's Avatar
    Join Date
    2004-06
    Location
    Upsidedown in dreamtown
    Posts
    928
    Login to Give a bone
    0

    Default Re: Import information from an Excel file into Title Block information

    The DwgProps routine would appear to write info into the Summary page of the drawing, I guess you could Field the TitleBlock and use the Summary information to populate it.

    If you are after a routine that will change Attributes to a value defined in a spreadsheet, I have a system that can be modified to do that. you would need to Export the Spreadsheet to a .csv file and let me know what the Attribute tags are, but it can be done.

  4. #4
    Member
    Join Date
    2006-11
    Posts
    11
    Login to Give a bone
    0

    Default Re: Import information from an Excel file into Title Block information

    I am not understanding how to invoke the "Dwgprops" file. I created a folder and a new drawing following the "X number" system, so that I could get an idea of how the lisp was working. Yet every time I use the load command, I get a nil exception. It doesn't help that I am still so new to lisps.
    Last edited by abroseDDG; 2007-01-05 at 10:16 PM.

  5. #5
    Certifiable AUGI Addict ccowgill's Avatar
    Join Date
    2004-08
    Location
    Iron Station, NC
    Posts
    3,197
    Login to Give a bone
    0

    Default Re: Import information from an Excel file into Title Block information

    for testing purposes:
    Test Folder Name: X0000
    inside that folder should be the dwgprops.txt renamed X0000.txt - capital X is important
    inside X0000.txt, the data should be filled out
    save the drawing into the X0000 folder so the routine knows where to look for the X0000.txt file (it is based on the current folder of the drawing that is open)
    in AutoCAD use App Load (AP) to load DWGPROPS.LSP and then use "DWA" to Auto Import the custom drawing properties. If "DWA" does not load them, use "DWF" to browse out to the proper location and grab the now X0000.txt (formerly dwgprops.txt) it should populate the custom drawing properties box (to access use DWGPROPS and click the custom tab)

    hopefully this gives more detailed information.

    The title block would then contain fields to auto-fill in the information - attached is our title block so you can have an example of how it is setup
    Attached Files Attached Files

  6. #6
    Woo! Hoo! my 1st post
    Join Date
    2020-12
    Posts
    1
    Login to Give a bone
    0

    Default Re: Import information from an Excel file into Title Block information

    Anyone still have the DWGPROPS.TXT file? Link is broken?

    I'm ultimately looking for a way to import data from a Excel spreadsheet into the CAD custom properties as well as rest of document properties. Hoping to combine this script with the GetExcel.LSP script.

  7. #7
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    8,771
    Login to Give a bone
    0

    Default Re: Import information from an Excel file into Title Block information

    Were you logged into the forums before attempting to download? The link worked for me.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  8. #8
    Login to Give a bone
    0

    Default Re: Import information from an Excel file into Title Block information

    I have never used DwgProps at my work, but with the help of some very useful posts on the forums by Gilles Chanteau, I was able to create NewProps.lsp to extract information from an Excel file and put it in DwgProps. I would recommend testing it in a new drawing first. Download and copy NewProps.lsp to a folder in your AutoCAD Search Path. You can download the latest version of GetExcel.lsp from https://autolisp-exchange.com/AutoLISP-Code.htm. Download the images and spreadsheet here to look at and test. Load NewProps.lsp and GetExcel.lsp and type NewProps on the command line to run it.
    Best of luck. Terry
    NewProps.png
    NA-09317-PB-xlsx.png
    NA-09317-PB-dwg.png
    Attached Files Attached Files

  9. #9
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,653
    Login to Give a bone
    0

    Default Re: Import information from an Excel file into Title Block information

    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3630, Core i9-9900K 5.0GHz, 128GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

Similar Threads

  1. 2016: Project Information Attributes in Title Block Family
    By cantcacheme in forum Revit Architecture - Families
    Replies: 5
    Last Post: 2016-09-19, 03:20 AM
  2. vba code to extract title block information
    By jbortoli in forum VBA/COM Interop
    Replies: 3
    Last Post: 2013-09-26, 08:05 PM
  3. Attributes vs Fields for title block information
    By stephen in forum CAD Standards
    Replies: 25
    Last Post: 2012-12-13, 10:18 AM
  4. Title Block Project Label Information
    By mybiswas in forum Revit Architecture - Families
    Replies: 1
    Last Post: 2010-07-21, 04:54 PM
  5. Replies: 3
    Last Post: 2007-05-29, 01:35 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
  •