Author Topic: Block Att Export?  (Read 6080 times)

0 Members and 1 Guest are viewing this topic.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Block Att Export?
« on: September 29, 2005, 03:32:44 PM »
Is there anything out there that will export all of a particular blocks attributes into either Excel or Access?

I have numerous blocks with the same name and they are full of attrinutes with specific room information.

I am using Autcad 2002.
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Bob Wahr

  • Guest
Re: Block Att Export?
« Reply #1 on: September 29, 2005, 04:01:53 PM »
Do you have express tools loaded?  If so you can use ATTOUT which exports to a txt file that can then be opened in excel.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Re: Block Att Export?
« Reply #2 on: September 29, 2005, 04:24:23 PM »

Quote
Do you have express tools loaded?  If so you can use ATTOUT which exports to a txt file that can then be opened in excel.

Yes, I do have Express Tools but I need a routine to export all occurrences of a block's attributes to create 1 database. Wether that is Excel or Access
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Bob Wahr

  • Guest
Re: Block Att Export?
« Reply #3 on: September 29, 2005, 04:26:30 PM »
OK, and?

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Block Att Export?
« Reply #4 on: September 29, 2005, 05:17:51 PM »
<Friendlies on, but ...> I don't mean to be rude, but does anyone read the manuals or press F1 anymore? The native AutoCAD AttExt command will export attribute data (true, you have to configure it, but it's so easy I can do it) in comma, space or tab delimited formats, and Excel and Access both have the native ability to parse and import said data (as does any reasonably capable spreadsheet or database program written in the last ten years). True, there's a wealth of utilities out "there" that will hand hold you thru the attribute exporting process, but there's a lot of power in the native product, with or without additional programming that is overlooked and/or untapped.

:)
« Last Edit: September 29, 2005, 06:03:57 PM by MP »
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Block Att Export?
« Reply #5 on: September 29, 2005, 05:20:15 PM »
I dont use F1 because my machine pauses for 30 seconds while it loads.  Cant have that....
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Block Att Export?
« Reply #6 on: September 29, 2005, 06:00:56 PM »
You guys are SO lucky that Tony T. doesn't post here when he visits.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Re: Block Att Export?
« Reply #7 on: September 29, 2005, 06:27:03 PM »

Quote
<Friendlies on, but ...> I don't mean to be rude, but does anyone read the manuals or press F1 anymore? The native AutoCAD AttExt command will export attribute data (true, you have to configure it, but it's so easy I can do it) in comma, space or tab delimited formats, and Excel and Access both have the native ability to parse and import said data (as does any reasonably capable spreadsheet or database program written in the last ten years). True, there's a wealth of utilities out "there" that will hand hold you thru the attribute exporting process, but there's a lot of power in the native product, with or without additional programming that is overlooked and/or untapped.

 :x :x :x :x
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Block Att Export?
« Reply #8 on: September 29, 2005, 06:28:57 PM »
Whoa !! nasty faces.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff_M

  • King Gator
  • Posts: 4096
  • C3D user & customizer
Re: Block Att Export?
« Reply #9 on: September 29, 2005, 06:56:20 PM »
And with EATTEXT you don't even need to select the blocks.....

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Block Att Export?
« Reply #10 on: September 29, 2005, 07:01:21 PM »
Yep, and if you pass the path to a valid delimited file to excel / access via a command line (startapp etc) it will automatically load or link to it (respectively).
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Block Att Export?
« Reply #11 on: September 29, 2005, 07:13:01 PM »

Quote
<Friendlies on, but ...> I don't mean to be rude, but does anyone read the manuals or press F1 anymore? The native AutoCAD AttExt command will export attribute data (true, you have to configure it, but it's so easy I can do it) in comma, space or tab delimited formats, and Excel and Access both have the native ability to parse and import said data (as does any reasonably capable spreadsheet or database program written in the last ten years). True, there's a wealth of utilities out "there" that will hand hold you thru the attribute exporting process, but there's a lot of power in the native product, with or without additional programming that is overlooked and/or untapped.

 :x :x :x :x

Sorry to hear you feel that way Don. How should I have worded it?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Re: Block Att Export?
« Reply #12 on: September 30, 2005, 08:02:20 AM »

Let's see. For starters I have numerous drawings to extract the attribute information from and I do not want to extract everything using EATTEXT. As I stated previously....

Quote
Is there anything out there that will export all of a particular blocks attributes into either Excel or Access?

Not every attributed block in the drawing. Also, since I do have numerous drawings to do this on I want it to create 1 database file (Excel or Access) Append if you will, so that I do not have to do extra combining of all of the txt files that get produced using ATTOUT and EATTEXT.

Does this clear things up?
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Block Att Export?
« Reply #13 on: September 30, 2005, 09:47:38 AM »
Quote
Is there anything out there that will export all of a particular blocks attributes into either Excel or Access?

The attext command will let you select blocks interactively or by using "_previous" to retrieve a selection set made previously via the "select" command or (ssget) etc.

If I recall you lisp, so a very simple snip to illuminate --

Code: [Select]
(if     
    (setq ss
        (ssget "x"
           '(   
                (0 . "insert")
                (2 . "MyBlockSpec")
                (66 . 1)
            )
        )
    )
    (command
        ".attext"
        "_objects"
        ss
        ""
        "_cdf"
        "path/myTemplate.txt"
        "path/myData.csv"
    )
)

Appending umpteen csv files can be as easy as (dos command line) --

Code: [Select]
for %i in (*.csv) do type %i >> MyNewFile.csv
Or batch file --

Code: [Select]
for %%i in (*.csv) do type %%i >> MyNewFile.csv
As noted previously, Excel / Access have native ability to process delimited files.

Of course, all of this can be scripted, automated, programmed to varying degrees, using native commands as noted or doing a full scale assualt using the development language of your choice, extracting exactly what you want and the using ADO to create and then populate a database. It's not hard, I've done it, but it's more information than I care to type today so you will have to do some research of your own.

But this --

Quote
Is there anything out there that will export all of a particular blocks attributes into either Excel or Access?

I have numerous blocks with the same name and they are full of attrinutes with specific room information.

I am using Autcad 2002.

Didn't suggest to me anything was needed beyond vanilla AutoCAD.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Re: Block Att Export?
« Reply #14 on: October 06, 2005, 09:01:32 AM »

When using the

Code: [Select]
(if     
    (setq ss
        (ssget "x"
           '(   
                (0 . "insert")
                (2 . "MyBlockSpec")
                (66 . 1)
            )
        )
    )
    (command
        ".attext"
        "_objects"
        ss
        ""
        "_cdf"
        "path/myTemplate.txt"
        "path/myData.csv"
    )
)

It wants a template. I looked in the HELP and I cannot find what is the template suppose to look like. I tried to leave this part blank and do not specify a template but it will not work unless I specify a template. Can anyone shed some light on what should the contents of the template should look like?

Thanks
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023