View Full Version : Populate title block fields with Access DB values - AutoCAD 2007
sinrise
2007-11-20, 09:04 PM
I don't know if this is the right forum or not but I haven't really found much of a reference to anything close to what I'm trying to do. My company uses Access.
In the title block of each DWG, the pertinent information includes customer name, project city, date created, last revision date, engineer and plan order # exist as fields that are updates via teh 'drawing properties' dialog. While this is easier than directly editing the text, I want to take it a step further and link those fields to actual fields in the Access DB.
All of this data, with a simple SQL query, can be pulled using the plan order #.
What I want to do is, when a new drawing is started, the user enters the plan order number only. The rest of the data: customer, city, etc... is pulled from the DB (where plan order # equals (whatever was entered)) and automatically populates the fields in the title block.
I've tried finding a solution in Sheet Set related forums, field related and any other set of keywords but I haven't found any way of actually doing this.
I have been able to get AutoCAD 2007 to link to an Access DB and display data. I'm still trying to figure out how to use SQL commands...
Any help out there?
rkmcswain
2007-11-21, 03:19 AM
Since VBA can both read an MDB file and write data to SSM properties - I would say this could be done. Are you looking to do this yourself or hire a consultant?
sinrise
2007-11-21, 04:26 PM
I was hoping to be able to figure out how to do this myself, unless it's extremely complicated. I simply haven't found much information on how to get AutoCAD to truly interact with a database, short of displaying records.
rkmcswain
2007-11-21, 05:08 PM
Writing SSM properties isn't terribly difficult - but there is very little documentation out there. You have to hunt around and find some examples. It can be done however - we have a few routines that populate SSM properties - which in turn are linked to Fields.
sinrise
2007-11-26, 10:37 PM
Actually, I was hoping to do this without using SSM...
rkmcswain
2007-11-26, 10:51 PM
Ok - then why use fields?
How about just populating a TEXT or MTEXT entity with the data from the MDB file?
Chris.N
2007-11-27, 01:42 PM
Actually, I was hoping to do this without using SSM...
are you creating your documents in modelspace then? that's the only reason i can think of not to use SSM.
sinrise
2008-05-07, 09:59 PM
Ok - then why use fields?
How about just populating a TEXT or MTEXT entity with the data from the MDB file?
That would work. Can someone at least point me in the right direction on how to accomplish this?
I also want to use the fields in drawing properties of existing dwgs to populate the table of the initial Access DB. Can this be done? More explanation below:
My company's programmer is currently working on a system that incorporates our drawings with the Access database. Once the module is complete, designers will no longer start new drawings or open existing dwgs with ACAD. It will all be done through Access, with all the DWG names created and indexed by Access. Most of our drawings already have fields for the title block that gets filled out in the drawing after it's open. I would like to be able to use those fields to help create the initial table of drawings for Access. Vice-versa, I want to populate new drawings title block info (as fields or just text entires) with Access DB data.
O', if there's a better standard out there, I'm open to anything. My company creates many, many smaller plans and our current files/folders system is getting too messy to manage. There are too many folders and it's hard enough getting planners to stick to the filename conventions without having to try to keep track of every DWGs location. Since we rely on our proprietary Access DB to manage pretty much all interdepartmental interactions, it makes sense to incorporate DWG management right into the DB.
tylerjmelancon394892
2014-02-28, 06:44 PM
That would work. Can someone at least point me in the right direction on how to accomplish this?
I also want to use the fields in drawing properties of existing dwgs to populate the table of the initial Access DB. Can this be done? More explanation below:
My company's programmer is currently working on a system that incorporates our drawings with the Access database. Once the module is complete, designers will no longer start new drawings or open existing dwgs with ACAD. It will all be done through Access, with all the DWG names created and indexed by Access. Most of our drawings already have fields for the title block that gets filled out in the drawing after it's open. I would like to be able to use those fields to help create the initial table of drawings for Access. Vice-versa, I want to populate new drawings title block info (as fields or just text entires) with Access DB data.
O', if there's a better standard out there, I'm open to anything. My company creates many, many smaller plans and our current files/folders system is getting too messy to manage. There are too many folders and it's hard enough getting planners to stick to the filename conventions without having to try to keep track of every DWGs location. Since we rely on our proprietary Access DB to manage pretty much all interdepartmental interactions, it makes sense to incorporate DWG management right into the DB.
I know this post is outdated but was bumping it so we can come to a solution. I to have the same exact question. CAD has been working STRICTLY out of a Microsoft Access Database for over a year now. Prior to that it was a different program that managed all of our files/drawings/etc.. Our entire company runs out of this database daily. When we get to work we log into this database and do everything out it all day everyday. This database has ALL of our design information and descriptions and dates and notes, which I assume are being stored in TABLES. I am not a guru when it comes to access but I can open and navigate through the master files when needing to go beyond what the Access Interface allows the users.
For a little behind the scenes this is how we operate, in short. We have hundreds of "Client" folders and within those folders are dozens of "job location folders". Within those folders are "master.mdb" files which contain ALL the information just pertaining to all the drawings for that specific "job location". Like he stated above, we open/create all of our ACAD drawings through this Microsoft Access Interface that has been designed by the guys who know all about that. The information is there I just am having trouble linking the two together and getting that information into my drawing automatically.
I am looking for a way to link the databases and create fields within the titleblock, so that when I open up a specific drawing for a specific location it will automatically populate what it is I desire, and in this case at the moment it would just need to be the 'Description'. The titleblocks are already created in each support folder for each Client. So most of the information is already exact such as Client Name, Facility Name, Inspection Company, Drawn By initials. See Photo for basic understanding.
95097
I am open for discussion and can answer any and all questions. Thanks so much in advance.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.