View Full Version : Attributes vs Fields for title block information
stephen
2007-06-26, 07:59 PM
Anyone using Fields rather then the standard Attribute definition when developing templates using ACAD2007? Are there any advantages in anyway by implementing the use of Fields rather then Attributes for collecting information on Title Blocks?
cadtag
2007-06-26, 08:07 PM
yes. The advantage is apparent when you start using sheet sets, and set up custom sheet set andsheet properties. Youy can then edit/control from a single location (SSM) vs opening and editing every drawing. It's not perfect, using 2006 I'm not able to deal with multi-line attributes, but it's a lot simpler than tweaking every sheet by hand.
Avatart
2007-06-27, 07:50 AM
I've been looking at this too, has anyone managed to hook up a database to furnish the Title Block with fielded information?
Augi Doggie
2007-06-27, 11:21 AM
I've been looking at this too, has anyone managed to hook up a database to furnish the Title Block with fielded information?
I have been for some time now. Like Cadtag, I've been using sheet sets with fields. I insert the titleblock with Current Sheet set title and drawing number fields. If I change the drawing titles or numbers, I can do it in the sheet set manager and not have to even open the drawings, they'll update automatically.
This is also handy if you have notes that reference another drawing, you can add a field to the note that references the other drawing number. If that drawing number changes, so does the note.
Avatart
2007-06-27, 12:27 PM
I have been for some time now. Like Cadtag, I've been using sheet sets with fields. I insert the titleblock with Current Sheet set title and drawing number fields. If I change the drawing titles or numbers, I can do it in the sheet set manager and not have to even open the drawings, they'll update automatically.
This is also handy if you have notes that reference another drawing, you can add a field to the note that references the other drawing number. If that drawing number changes, so does the note.That is all well and good and very useful, but I want to hook this up to a proper database (ie Access), what I want to be able to do is have a one stop shop for all the Title Block stuff, but also for running scripts, tracking issues, filing Record Copies, etc.
cadtag
2007-06-27, 03:59 PM
Hooking field and databases directly doesn't seem to be possible. unless a DIESEL expression can suck info from a DB. The kludge that comes to mind is having a LISP routine that reads the data from the DB and writes it to the USER* system variables, and point a field to the sysvars.
Augi Doggie
2007-06-27, 04:32 PM
That is all well and good and very useful, but I want to hook this up to a proper database (ie Access), what I want to be able to do is have a one stop shop for all the Title Block stuff, but also for running scripts, tracking issues, filing Record Copies, etc.
Well in that case, my response was pretty much useless wasn't it? Sorry.
I your situation Attributes may be the way to go. Fields are handy for "displaying" information. It's the sheet set manager that really has the information that you would want to use in your database.
If it's possible to link the .DST file to an external database is something beyond my knowledge.
Avatart
2007-06-28, 07:34 AM
Well in that case, my response was pretty much useless wasn't it? Sorry.
I your situation Attributes may be the way to go. Fields are handy for "displaying" information. It's the sheet set manager that really has the information that you would want to use in your database.
If it's possible to link the .DST file to an external database is something beyond my knowledge.Your response was useful, more than you might think actually, as it seems to be leading to a solution, if I can read that .DST, then I can programmatically hook it up to our database systems with a round tripping program, so if you change the drawing, the database changes and vice versa.
Now, where's that DST for me to rent asunder...?
rdaniel
2007-06-28, 02:50 PM
I've been looking at this too, has anyone managed to hook up a database to furnish the Title Block with fielded information?I'm not too familiar with access, but I've set up a link between an excel spreadsheet ("database") and CAD. It works ok. I use the sheet set and PN to control all of my sheet information in my title blocks, but I wanted to also have a single control point for all of my drawing locations. I had originally used the construct - view - sheet method in ADT to do this, but it is horrifically clumbsy, hard to manage, and time consuming.
What I did with the excel file linking was set up worksheets with information for each drawing placed on a sheet. The cells were: Drawing Title Drawing # Sheet # Description. I then linked my drawing titles and callouts with fields to the database. This was fairly helpful for making sure coordination was automatic between the drawing locations on the sheets and their callout(s).
While ADT's perscribed way (const - view - sheet) is clumbsy, this one is not perfect either (all though it does work better, in my opinion). One of the biggest downsides is that the field is linked to a specific cell and not any specific information. This makes your worksheet organization a little harder when you start moving drawings around on sheets. I haven't got a chance to try this method out another project yet and refine it, but I hope to have another chance soon. Btw, one of the reasons that I liked this method is that I can acheive coordination and skip the view step alltogether. I don't have to worry about creating a million named views and then placing each one on a sheet (this takes forever). Also, when you have to process and plot that many viewports it is really time consuming. Outside of our constructs (base files) which we xref into the sheets, we just draw in the model space of the sheets files with this approach. The architects here seem to like this a lot better since it is almost identical to how we managed projects in CAD before the PN and sheet sets came along.
Anyway, to answer your question, I have linked to a database.
Avatart
2007-06-28, 03:25 PM
Randall,
That would be in 2008, right? I don't have that yet (still being certified for use by IT), but it was something I was planning to look at.
I know what you mean about the "ADT way", it is utterly hopeless for any project bigger than a condo.
rdaniel
2007-06-28, 03:28 PM
Actually, I haven't deployed 2008 yet or 2007 for that matter - been waiting on hardware upgrades. We are still using ADT 2006 office wide.
Avatart
2007-06-28, 03:55 PM
Actually, I haven't deployed 2008 yet or 2007 for that matter - been waiting on hardware upgrades. We are still using ADT 2006 office wide.I thought that was one of the big "advantages" of 2008, that it would hook up to a spreadsheet, how did you manage that in 2006 (the same as I am using, as I dumped 2007 for being rubbish)?
rdaniel
2007-06-29, 08:55 PM
I thought that was one of the big "advantages" of 2008, that it would hook up to a spreadsheet, how did you manage that in 2006 (the same as I am using, as I dumped 2007 for being rubbish)?When you insert a field use the AEC Database Field category (see attached for how I'm accessing it). There is a trick to initially setting up the link between ADT and your spreadsheet. You have to establish it with a linking file (I think a .dsn file). The help menu should walk you through it.
Let me know if you have any trouble figuring it out and I'll help you where I can.
Avatart
2007-07-02, 08:01 AM
When you insert a field use the AEC Database Field category (see attached for how I'm accessing it). There is a trick to initially setting up the link between ADT and your spreadsheet. You have to establish it with a linking file (I think a .dsn file). The help menu should walk you through it.
Let me know if you have any trouble figuring it out and I'll help you where I can.Thanks for the info. I'm probably being a bit thick here, but what is a .udl file that the connection is asking for?
rdaniel
2007-07-02, 02:12 PM
Thanks for the info. I'm probably being a bit thick here, but what is a .udl file that the connection is asking for?Definately not being thick. Setting up the link is probably the trickiest part of the deal. I said in the first post that I used a .dsn, but I think I ended up using a .udl. I really don't know the difference to tell you the truth. The wizard should walk you through setting up this file though.
Look for this item in the help menu. "Creating a Data Link to an ODBC Source"
Btw, I never set this link up on multiple machines, but it might be worth the effor. As soon as a user opens a field linking to your database, they then have access to that database. I guess it kind of makes the link either temporarily or something. You may experience a little bugginess this way, but it's not anything major. I think the biggest bugs happen when you have the excel file open for editing and you also have a referencing CAD file open. You'll tend to get some error messages this way (like when you save the excel file), but they are mostly just annoying (they won't crash CAD or anything.)
Let me know how it goes.
Avatart
2007-07-02, 04:11 PM
Let me know how it goes.All went well until I tried to access the data, then it threw me out of AutoCad. :(
rdaniel
2007-07-02, 04:18 PM
Did you try it a second time? CAD can be pretty unstable just on its own. If you still have trouble, send me the files and I'll see if I can give it a go.
So, you got the udl file created, but when you tried to access the file in the insert file dialog box, it crashed? Did you use the wizard to create it?
Avatart
2007-07-02, 04:22 PM
Did you try it a second time? CAD can be pretty unstable just on its own. If you still have trouble, send me the files and I'll see if I can give it a go.
So, you got the udl file created, but when you tried to access the file in the insert file dialog box, it crashed? Did you use the wizard to create it?I did try it a second time and it worked (WOOHOO!), seems the problem was I waas working in an unsaved file first time around, used an existing drawing and it worked fine.
Right, now I have got that cracked; how do I make it do a lookup? ie, if I have a drawing schedule, how can I make it look for it's own filename and read the following cells for Drawing Title and the like?
rdaniel
2007-07-02, 04:34 PM
Right, now I have got that cracked; how do I make it do a lookup? ie, if I have a drawing schedule, how can I make it look for it's own filename and read the following cells for Drawing Title and the like?Just insert a field in a text box or attribute, etc. and reference the database. You can select any worksheet tab or cell from your excel file. See the image in one of my previous posts.
Just remember that the link is to a specific cell location, so if you move cells around you have to repath. This is the biggest downside of this. This is why I have a description field to be the constant for the view. Everything else (drawing #, title, sheet #) can change and I always keep this the same. If you move drawings around a bunch then they become a little harder to find in your worksheet, but if you set up your references before you start moving, then its all automated. I haven't figured out a way around this yet. One idea I have is to create a seperate "look-up" worksheet and use an excel formula to find the information, but its still an untested idea at this point.
Avatart
2007-07-03, 07:47 AM
Just insert a field in a text box or attribute, etc. and reference the database. You can select any worksheet tab or cell from your excel file. See the image in one of my previous posts.
Just remember that the link is to a specific cell location, so if you move cells around you have to repath. This is the biggest downside of this. This is why I have a description field to be the constant for the view. Everything else (drawing #, title, sheet #) can change and I always keep this the same. If you move drawings around a bunch then they become a little harder to find in your worksheet, but if you set up your references before you start moving, then its all automated. I haven't figured out a way around this yet. One idea I have is to create a seperate "look-up" worksheet and use an excel formula to find the information, but its still an untested idea at this point.So in reality I can't reference the sheet and programmatically get the field to search for say, a value in a column?
Let me explain in a little more detail what I am trying to achieve:
Let's say I have a Drawing Schedule that has three lines of entry:
D-30-010 Architecture, General Arrangement, Ground Floor 1:100
D-50-010 Mechanical Services, General Arrangement, Ground Floor 1:100
D-63-010 Electrical Services, General Arrangement, Ground Floor, Lighting 1:100
And from a drawing with the filename D-50-010, I want the Title Block to interrogate the Drawing Schedule, look for it's own filename and read the Title and Scale, etc. to populate out the rest of attributes.
This would be easy enough to do long hand in the above case, but I regularly have to deal with 700 drawing sets, so I really would like this to be an automated thing.
rdaniel
2007-07-03, 01:56 PM
Well, you can write simple formulas inside of the field itself, but I don't know if it will support anything as complex as a boolean (if / then) statement. For that matter, I don't know if you can combine a formula with a database field. Check it out inside of the field dialog box and I'll try to look at it later today as I have time. I've been hoping that there was someway to be able to select the view and cause it to auto-populate the other fields (title, #, scale, etc.), but I haven't given it too much of an effort yet. If you find something let me know. Maybe the ADT developers / pros can chirp in? Hello? Calling all pros. Are you out there?
rdaniel
2007-07-03, 07:04 PM
Well, I dug around a bit in 2006 and wasn't able to combine a formula with an AEC database (not that I found anyway). We are looking at deploying 2008 pretty soon here, and maybe that will have some new options. Don't know yet????
If you get any ingenious ideas or run accross another way, let me know. This method is still pretty handy, especially when you have multiple callouts for one drawing. My goal is to get a project template set up with all of the drawing titles and callouts pre-programmed, so then you just change the values in the excel file and everything is coordinated.
Avatart
2007-07-04, 07:55 AM
Well, I dug around a bit in 2006 and wasn't able to combine a formula with an AEC database (not that I found anyway). We are looking at deploying 2008 pretty soon here, and maybe that will have some new options. Don't know yet????
If you get any ingenious ideas or run accross another way, let me know. This method is still pretty handy, especially when you have multiple callouts for one drawing. My goal is to get a project template set up with all of the drawing titles and callouts pre-programmed, so then you just change the values in the excel file and everything is coordinated.I'm kinda hoping that 2008 will solve all these problems. We haven't had the roll-out of that yet, but I'm looking forward to having a play.
I'll keep you posted of any developments.
abdulhuck
2007-07-04, 02:28 PM
My suggestion is to use Access database with attribute blocks. In attributes you can use any field. So it will grab the required value automatically and if you configure access database properly, it can write back the values to the database. It is more difficult to interrogate and excel file than an access database. I would prefer to code the routines in VBA as the functionality of the built in tools in AutoCAD are very limited.
Let's say I have a Drawing Schedule that has three lines of entry:
D-30-010 Architecture, General Arrangement, Ground Floor 1:100
D-50-010 Mechanical Services, General Arrangement, Ground Floor 1:100
D-63-010 Electrical Services, General Arrangement, Ground Floor, Lighting 1:100
And from a drawing with the filename D-50-010, I want the Title Block to interrogate the Drawing Schedule, look for it's own filename and read the Title and Scale, etc. to populate out the rest of attributes.
In this case, you may require to create an MDB with minimum 3 fields, FILENAME, TITLE, SCALE. If the title is swapped into more lines, make it as TITLE1, TITLE2 & TITLE3 as required. In your drawing title block, use field within attribute for FILENAME, which will be updated automatically when you save the drawing. On begin save event or through a command call, open your database through VBA, seek for the file name field, update all other attributes from the values read from the database.
I could not find the topic VBA: Integrating AutoCAD VBA with Microsoft Access - Part 1 (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=2971496&linkID=2475176) to 3 by Dave Espinosa-Aguilar, as listed here (http://www.caddigest.com/subjects/autocad/tutorials/programming.htm). It would have given you a good start with database manipulation.
Regards,
Abdul Huck
Avatart
2007-07-04, 02:47 PM
Hi Abdul,
Thanks for the pointers, I found the articles you mentions, they are here (http://discussion.autodesk.com/thread.jspa?messageID=4999295). It does look extraodinarily complicated to just lookup a value and post it back to AutoCad....
dannyk346068
2012-12-13, 10:18 AM
I'm. I'm sure about the capability of this @ 2007 Since I Used it in 2005. If A Sheet set Template and A Drawing Template are in the Template Path(s), When you Create A New Sheet Set based on the template and add new Sheets to it, all the Title Block Issues become fully automatic. Besides all the Standard Properties, You can Add Custom Properties to meet your Needs. When doing so, You can Add Custom properties to Sheet(s) (Shuch as 'Sheet #' )/or to the whole Sheet Set (such as 'Project Name').
If You Nedd more help, you can approach me directly.
Dannyk
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.