Author Topic: Xref'ing Attribute values out to Excell.  (Read 1929 times)

0 Members and 1 Guest are viewing this topic.

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Xref'ing Attribute values out to Excell.
« on: June 29, 2007, 03:52:45 PM »
I am starting this thread out in the cad part but it might end up in the programing section. 
I have tried searches but havent really found anything that comes close  If I missed something in my search, please point me in the direction.

I was approached by one of my users with a two part problem that his client asked of him.
The first I new could be done easily (okay I needed help but I knew it could be done) and it is over here (again I will say thanks)

The second part is to take the values of an attributes in a block and get them to excel.  Okay I can do that too but they want them to be linked so if a attribute value changes it automatically updates sort of how an xref behaves.  And I can do that too with fancy dancy 08 version (I think haven't played with it) with its new linked tables.  But dwg file will get sent to other architects (becuase the client is bounded to bid out renovations projects to different design teams) so there most likely be possible version compatibly. 

Basically the client is starting down the road of basic BIM.  the building is over 4 floors and each floor has over a 100 spaces.  The client will take the spread sheet that I create and then add columns on either side of my exported columns and mostly likely will move my columns around and split them up

We don't extract our attributes all that much and if we do it for a simply one time shot with simple data. 
Two issues that I have with simple extraction. 
One is not linked like my user wants
Second is that room name could be split up over 3 attribute tags and thus three excel columns which I need to get it to one column.

So I don't know if auto cad can has something it bowels somewhere  or something can coded.  Or do I look at from the excel end instead of the cad end.

 I just don't know so i figured I would start asking for ideas or hopefuly how someone has achieved this. Thanks in advance.
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Xref'ing Attribute values out to Excell.
« Reply #1 on: June 29, 2007, 05:02:42 PM »
We have a floor plan that has the cubicals numbered with the persons name within.  It is linked to an Ms Access database, so once they change the database all I have to do is connect to the database and reload the tags (like an xref) and print it out.  I think you can edit the database file from acad, but I haven't tried as we don't want two people editing the Ms file.  Also the text is Mtext, not sure if attributes would work.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Xref'ing Attribute values out to Excell.
« Reply #2 on: June 29, 2007, 09:23:52 PM »
Just so I am straight on this ....

1) You create the drawings
2) You create the excel file
3) You send the excel file to architect
4) Architect changes excel file and/or drawing
5) Architect sends you edited drawing and/or excel file

You want to make sure the excel file and the drawing are accurate ...

I am not aware of any built in device by which this can be accomplished, however, it is entirely possible to create a VBA ObjectChanged reactor and embed that reactor code into the drawing. (Yeah I know it probably isn't the best thing to do, but the option is available) When the drawing is edited, the reactor would determine if the object edited was the object type you have previously determined should be handled. The excel file can then be updated with the changed data ... now ... to make it even more reliable, you could create a VBA class that could handle opening the excel file associated with the drawing (presumably named the same as the drawing .. makes for less coding having to store the name dynamically) and then systematically verify the attributes one at a time and notify the user if one or more do not match.

Now .. is that a simple program? Well, it shouldn't be too dificult for a seasoned programmer, but it will definitely be complex, particularly considering the amount of error checking needed to pull it off ...

I will be out of the office for a week or more so I won't be able to do anything on this ... even if I had the time ... but there could be something out there that does it already .. very similar to connecting a db to the drawing .. but having 2way communication is tricky considering that the data can be edited on either end.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Xref'ing Attribute values out to Excell.
« Reply #3 on: July 01, 2007, 09:43:40 AM »
Thanks for the responses Tim and Keith.

Just so I am straight on this ....

 :-D :-D
I will try to explained this better.

Background:
 We are the Architect however we are one of handful of firms that work for this client.  The client is an hospital and the Facility Management folks of the hospital want to get a better hold on square footages of the buildings and the spaces therein.  Due to all the expansions and renovations within, their previous data has become suspect due to not keeping up with changes.  So they want to start with a clean slate and have more accurate data and they hired us to do that. 

Responses to your statement.
1) You create the drawings
Cad files are already created.  The client retains the cad files.  When there is a renovation that needs to be done, the clients signs out the cad file to the architectural firm (whomever that might be) and they design the renovation and then when completed they sign back in the revised cad file.

2) You create the excel file
Yes.  couple of times a year, they will send us all the cad files, we do whatever house keeping that needs to be done to prepare the files for extraction and then do the extracting/xref'ing this information.  The information will consist of room name, room number and square footage in (3) excel columns.  This will all come from a room tag block that resides in the cad file that consist of 5 attribute tags.

3) You send the excel file to architect
  We return the cad file and the newly created excel sheet (the first go around) or the updated spreadsheet to the client.  To best of my knowledge and I asked about it, the client never touches the cad file himself.  He has us or whomever to do that.  The client and their bean counters do their thing with spread sheet.  Again to my knowledge and I asked about it, they will not touch those 3 excel columns that we created.  They just put in additional columns on the sides or other spread sheets and print out a report in the end.

4) Architect changes excel file and/or drawing
The cad file(s) is the only things that changes (by whomever) so the data is going only one way and that is to the excel file.

5) Architect sends you edited drawing and/or excel file

Did I answer this with above questions? If not ask again.  :-)

You want to make sure the excel file and the drawing are accurate ... 

I know for a fact the Client does and since they hired us ........ :-)  It no that a warm body could not do what this program could do but the program will have less errors and will be quicker.

I am not aware of any built in device by which this can be accomplished, however, it is entirely possible to create a VBA ObjectChanged reactor and embed that reactor code into the drawing. (Yeah I know it probably isn't the best thing to do, but the option is available) When the drawing is edited, the reactor would determine if the object edited was the object type you have previously determined should be handled. The excel file can then be updated with the changed data ... now ... to make it even more reliable, you could create a VBA class that could handle opening the excel file associated with the drawing (presumably named the same as the drawing .. makes for less coding having to store the name dynamically) and then systematically verify the attributes one at a time and notify the user if one or more do not match.

Now .. is that a simple program? Well, it shouldn't be too dificult for a seasoned programmer, but it will definitely be complex, particularly considering the amount of error checking needed to pull it off ...

I got to thinking about this some more and the way I see this on how to approached it .... let me stop right here and say this I am not a seasoned programmer and I have only worked with lisp and visual lisp and so therefor I am only a 4th grade elementary school programmer. ....  For discussion purposes let say something has to be programed to do the work. There might be something in autocad or excel that can do this but until we find it, lets stay with programing side of it. This programed would access the cad file and basically extract all the pertinent information.  It would then compare that information against the information in the excel file and revise the excel fill accordingly. This is how I see it being done but there is always more than one way to skin a cat.   
Not to self: find out where the line is in excel spreadsheet file of where I leave of and the client takes over.

I will be out of the office for a week or more so I won't be able to do anything on this ... even if I had the time ... but there could be something out there that does it already .. very similar to connecting a db to the drawing .. but having 2way communication is tricky considering that the data can be edited on either end.
 
There is probably somehting out there but I don't how or what to call it so I can search for it becuase I don't know what I am looking at.  That is why asking here first.  Have a good vacation Keith.

Now if there is to be something programed, even though the code is going to be miles high above my head, I would like to do something so I learn from it.

Thanks guys
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Xref'ing Attribute values out to Excell.
« Reply #4 on: July 01, 2007, 10:26:02 AM »
Your clarification has made more sense to me ... there are indeed some facilities management software out there that run in conjunction with AutoCAD. The one that I am familiar with allows you to place furniture, adjust room dimensions, move employees etc, it is all handled from AutoCAD with changes being allowed on both sides (I think). I just can't remember the name right now. It allows you to connect to the DB .. any changes in AutoCAD will be made in the DB ... and you can verify the DB by checking it with the drawings. When I return next week, I will try and get the name for you, unless you have it resolved by then.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Krushert

  • Seagull
  • Posts: 13679
  • FREE BEER Tomorrow!!
Re: Xref'ing Attribute values out to Excell.
« Reply #5 on: July 01, 2007, 10:42:47 AM »
Your clarification has made more sense to me ... there are indeed some facilities management software out there that run in conjunction with AutoCAD. The one that I am familiar with allows you to place furniture, adjust room dimensions, move employees etc, it is all handled from AutoCAD with changes being allowed on both sides (I think). I just can't remember the name right now. It allows you to connect to the DB .. any changes in AutoCAD will be made in the DB ... and you can verify the DB by checking it with the drawings. When I return next week, I will try and get the name for you, unless you have it resolved by then.
Thanks.  I will do more digging on my end.
Going anyplace good?
I + XI = X is true ...  ... if you change your perspective.

I no longer CAD or Model, I just hang out here picking up the empties beer cans