Extracting attributes?

I am on version 14 Pro, and  am assuming that I am just somehow overlooking a feature in BricsCAD.  I pursued this years ago, and even then it was quite a old problem.  It seemed, at the time, that there was no easy way to extract attributes. Rather, it used the exact same method used in AutoCAD in the 80's, which require you to create a specially coded text file for each set of blocks, for which you wanted to obtain data.

This can't be the situation now days, and I  must just be missing something.  I know there are 3rd party solutions, and that is what i used years ago.  But, it would not surprise me if there were possible compatibility issues, and I would prefer to not go down that road again.

How can I extract all the attributes for all the blocks in a drawing?  Of course it would be nice to somehow filter the blocks I want to use. But, even if it has everything at once, I can sort them out in Excel.

What am I overlooking?
-Joe

Comments

  • Have you tried looking for an answer to this in any of the CAD Forums out there, you will need a customized LISP file to do this.  Such lisp are publicly posted on these forums.
  • Here is a link to a very nice attribute extractor from LeeMac an expert Lisp Coder.

    Attribute Extractor

    Have fun with it.
  • I believe Joe is looking for a built in solution, which I also thought might have existed by now.

    I have a couple of lisps I wrote years ago which I still find extremely useful with attributes, unpolished as they are.

    Always felt that those uninterested in add-on routines were missing out on a feature which only needed a relatively simple extension or interface to make it very powerful.

    But it still seems the most common use of attributes is to keep groups of text together and fill pre-defined title block boxes.

  • John,

    One of the many benefits of CAD programs allowing integration of 3rd party programs ie: lisp, net etc. , is the ability to customize the program to the users specific use.  Although the specific CAD programs may contain some limited targeted uses (like the new sheet metal functions in BricsCAD), it would be impossible to incorporate all possible uses.  There are many ways to use attributes; architectural schedules, mechanical parts list to name a couple, it would be impossible to foresee just what a particular users requirements may be for attribute usage, the use of an independently developed program in this instance should not be overlooked.

    While BricsCAD does not have this particular application built in yet should not be a surprise, as I am sure functions are added based on number of user request among other reasons. 

    Bruce

  • Thank you very much Bruce for your program.  I had used it in the past, and it works well in v14.

    John Gaunt, you are correct that I was hoping for a built-in solution.  I had spent several days worth of effort trying to get a translation program working in BricsCAD v14, and I still have nothing working.  Then, the most recent update to v14 itself didn't work, and to fix it I had to uninstall BricsCAD, then reinstall the earlier version.  Of course, this got rid of all my add-ons. So, I was getting tired of all my effort working with 3rd party solutions.

    -Joe
  •  While it only seems to work for the current tab, there is a built in attribute extractor which can be found in the menu of V14:

    Tools -> Attributes -> Extract Attributes

    Or on the command line with ATTEXT, you can dump the attributes from the selected blocks into a couple of different files. 

    In the release notes I remember reading that you can then copy and paste a bunch of cells from Excel and upon pasting in BricsCAD, a table will be created with your data; I just wish this worked with LibreOffice...
  • I agree with the suggestion for LibreOffice.  Having to use "real" Excel is an unnecessary expense when you have no other reason to have Excel.
  • In case anyone needs reminding, here is an excerpt from the help file describing the template that must be created in order to use ATTEXT.

      The template file is an ASCII text file that specifies the attribute data fields to be written in the extract file. Each line of the template file specifies
      one attribute field. ...

      Each line in the template file must start with the field name. Block name and insertion-point values must begin with BL:. The next nonblank
      character must be either a C (indicating a character string field) or an N (indicating a numeric field). This character is then followed by three digits
      indicating the width of the field (in characters). The final three digits indicate the number of decimal places (for numeric fields). In the case of
      character fields, the last three digits must be zeros (000).

    Note that you must already know the names of any possible attribute tags.  You cannot select them from a list.  I recall actually wrestling with this back in the 80's with the DOS version of AutoCAD. Even then, I viewed it as a somewhat obtuse method of extracting the attributes.

    -Joe

  • Agreed, add ons are great for building further features to suit unique requirements and short cutting operations.

    I have a large number of routines for just those reasons. Some have become redundant after being built-in, others I wouldn't expect to be.

    I believe attributes are a special case - text has a degree of manipulation without programmed help, the only difference with attributes is they are less 'filterable', listable or findable where you might hope they would be more so.

    Extracting to a file is ok as a basic 'fits all' sort of function, but even the way of doing that is archaic - the main advance has been you now don't have to use Edlin to create retarded templates you are never sure will work.

    I feel vanilla users really miss out where they have to do some programming to even see that something is useful or not.

     

  • When using Ctrl+C in Excel to copy data to the Windows clipboard, Excel is actually copying the selected data in multiple formats. It is up to the application into which the data is pasted to use the most convenient format, e.g. a paint program will prefer the bitmap format. For pasting data into a dwg table, BricsCAD uses the version of the data that was posted as Excel 2003 XML format.

    Unfortunately, LibreOffice does not copy an xml format version of the data to the clipboard, but... there is a workaround. In LibreOffice save a copy of your spreadsheet as "Excel 2003 XML". In BricsCAD, create a new table, select the "From Data" option and use the Browse button to select the xml file: that's it.

    Concerning new attribute extraction tools, Bruce Fillmore's remark happens to be quite correct:
    "While BricsCAD does not have this particular application built in yet should not be a surprise, as I am sure functions are added based on number of user request among other reason"

    Kind regards
  • Probably doomed to remain a hidden treasure then - users without seeing what's possible are unlikely to ask, and I have my own tools.

    They are unpolished and based on writing attribute contents as text on screen, but I'm happy to share.

  • When using Ctrl+C in Excel to copy data to the Windows clipboard, Excel is actually copying the selected data in multiple formats. It is up to the application into which the data is pasted to use the most convenient format, e.g. a paint program will prefer the bitmap format. For pasting data into a dwg table, BricsCAD uses the version of the data that was posted as Excel 2003 XML format.

    Unfortunately, LibreOffice does not copy an xml format version of the data to the clipboard, but... there is a workaround. In LibreOffice save a copy of your spreadsheet as "Excel 2003 XML". In BricsCAD, create a new table, select the "From Data" option and use the Browse button to select the xml file: that's it.

    Concerning new attribute extraction tools, Bruce Fillmore's remark happens to be quite correct:
    "While BricsCAD does not have this particular application built in yet should not be a surprise, as I am sure functions are added based on number of user request among other reason"

    Kind regards

    Ahh, very handy!
  • Sorry to labour the point, but with at least some interest in how extracted data can be used it would seem the template method of extracting it is a little out of step, sophistication-wise and even demand-wise, on about its 30th birthday.

    Apparently Acad still thinks it's ok, or has it moved on slightly?

    Even an option in Attext to collect all attributes without a template, would be some improvement.

  • Back in AutoCAD v10 (not 2010!) a user probably wouldn't have had access to a spreadsheet or any way to manipulate the data.  So, having everything pre-formatted by using a template would have been necessary.  The data was perhaps sent to a main-frame computer in the next step of the process.

    For my recent effort, I was expecting to do all my manipulations in Excel. And now that free spreadsheets are available, that is an easy choice for anyone.  If the program only offered the choice of exporting data for all blocks, with or without attributes, it would be useful.  Saving as a CSV. or to the clipboard, would allow the person to put the data into any spreadsheet.

    So, the need for a lot of programming to make a good user interface for a fancy attribute extraction routine is just not there.  Once the data is in a spreadsheet, the user can sort out the stuff they want in the spreadsheet.The power of a spreadsheet can be utilized instead of a built-in routine.

    As others have mentioned, there are certainly plenty of 3rd party solutions, both low cost and even free.  But, hunting them down, and trying several of them can be very time consuming.  I knew at least part of my original post was just venting.  But, I felt it was appropriate venting.

    -Joe
  • Joe, spreadsheets were around and popular on desktops before autocad with attributes showed up. Long before windowz.

     There was more choice in professional 'office suites' and they often had a good database program too.

    CDF and SDF were always the export options for the very reason that they could be used on a standalone machine.

    The method and the options have never really changed.

    The bottleneck has always been the method of extracting

This discussion has been closed.