Uploading attributes to blocks

Discussion in 'AutoCAD' started by Thomas 'bacco|007' Baxter, Jul 31, 2004.

  1. Does anybody have an easy way to do a 'mass-load' of attributes from a
    secondary document (preferably csv and/or text file) into blocks where
    there is a common 'key' between a block name/attribute and a value in the
    2ndry document (again pref 1st value of each line)?

    Failing that, anybody got any ideas on how to do it?

    Cheers :)
     
    Thomas 'bacco|007' Baxter, Jul 31, 2004
    #1
  2. Thomas 'bacco|007' Baxter

    David Bethel Guest

    The simplest way is to build the text file into an Autolisp expression

    (setq attlist '(
    ("TAG1" . "VALUE1")
    ("TAG2" . "VALUE2")
    ))

    Then use (load "TEXTFILE.TXT")

    Now you have dotted pair list to use within AutoLISP and step thru the
    INSERT defination and assoc ATTRIB tag and entmod the values.


    I do this thru either database reports or spreadsheet string
    concatenations. -David
     
    David Bethel, Jul 31, 2004
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.