Results 1 to 7 of 7

Thread: Express Block Attribute Import Adding Quotes

  1. #1
    Member
    Join Date
    2000-12
    Location
    Des Moines, IA
    Posts
    5
    Login to Give a bone
    0

    Default Express Block Attribute Import Adding Quotes

    I'm having an issue with some fields randomly importing enclosed with added quotation marks. "Xxx" Does somebody know what might cause this or how to avoid this behavior?

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,417
    Login to Give a bone
    0

    Default Re: Express Block Attribute Import Adding Quotes

    Can you document the steps you are using and perhaps upload your input file and a sample dwg?
    C:> ED WORKING....


    LinkedIn

  3. #3
    Member
    Join Date
    2000-12
    Location
    Des Moines, IA
    Posts
    5
    Login to Give a bone
    0

    Default Re: Express Block Attribute Import Adding Quotes

    1 Export block attributes with only aae_id field entered (pv_tag)
    2 Add reminder of attribute dated to csv spreadsheet
    3 Import block attribute data from csv spreadsheet

    From attachment, importing spreadsheet doesn't have quotes in vessel_location field/attribute but after importing, both attribute editor and resulting data extraction table have quotes
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,417
    Login to Give a bone
    0

    Default Re: Express Block Attribute Import Adding Quotes

    As it happens, I was doing some programming a few days ago that dealt with csv files. I had the same problem and figured out what was going on. Notice that the value for that field has commas in it. You are working with a "comma separated variable" file. So why isn't that value divided into 3 extra fields? If you open the file in Notepad, you will see that the string with commas in it has quotes placed around it so that the commas don't act as delimiters. The only way to fix it that I can think of, is to write some code that strips out the quotes from the attributes after the import is done. The attin command is defined in the attout.lsp file. You could modify that to do the cleanup.
    C:> ED WORKING....


    LinkedIn

  5. #5
    Member
    Join Date
    2000-12
    Location
    Des Moines, IA
    Posts
    5
    Login to Give a bone
    0

    Default Re: Express Block Attribute Import Adding Quotes

    Thanks for the extra set of eyes. I just wasn't seeing what was causing the issue. ~200 rows in the spreadsheet so I wasn't looking to manually correct the quotes. 👍

  6. #6
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,417
    Login to Give a bone
    0

    Default Re: Express Block Attribute Import Adding Quotes

    You don't have to do it manually. You can fix the attin command to do it for you. I doubt you would notice the extra time it takes to strip the quotes.
    C:> ED WORKING....


    LinkedIn

  7. #7
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,417
    Login to Give a bone
    0

    Default Re: Express Block Attribute Import Adding Quotes

    I just took a look at the file generated by the attout command. It's a text file, not csv, and it's tab delimited, not comma delimited. So you're changing it into a csv is what's introducing the errors. Excel can open a tab-delimited txt file. However, it added quotes to a field with commas in it and saved them when I saved it back to a txt file. I opened the file in Notepad and easily deleted the quotes before importing with the attin command. It's not hard if you keep it as a tab-delimited file. Stay away from csv.
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. Replies: 0
    Last Post: 2015-08-07, 03:59 PM
  2. AC12-1: Express Yourself Meet the Programmers of the Express Tools
    By Autodesk University in forum General Design
    Replies: 0
    Last Post: 2012-11-19, 03:44 PM
  3. Copy previous Block Attribute Value to next Block Attribute
    By CADfunk MC in forum VBA/COM Interop
    Replies: 8
    Last Post: 2009-02-27, 09:46 PM
  4. attribute extract and attribute import
    By rstiles in forum ACA General
    Replies: 3
    Last Post: 2008-09-12, 02:55 PM
  5. Express Tools vs Express Tools vs Express...
    By madcadder in forum AutoCAD General
    Replies: 4
    Last Post: 2006-10-12, 12:40 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
  •