style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
m> wrote in message
there a way to link the Property Set information in an ADT object to a
database like MS Access? I know that I can create an Access database and link
the fields to objects in AutoCAD (ADT or otherwise) using dbConnect but, so
far, my research seems to suggest that the two are mutually
Now that I understand what you are looking for, there are a couple of ways to
approach the problem. One of the underlying principle of ADT is that the
building model is the most important thing, and that ADT (AutoCAD) is just one
possible author of that data. With the ActiveX toolkit (VBA) it is possible to
read and write drawing data (door width) and property data (Fire Rating) from
either inside of ADT, or from another program. So here are some of your
1. Write a VBA program in ADT that will write information from the ADT
drawing file to an Access (or Excel) database. Allow the data to be modified in
the mdb file, and then read the data back into ADT to update objects. In this
scenario, the CAD User would Push data to Access, and Pull data from
2. Write a VBA program in Access (or Excel) that would open up ADT drawings
and pull the data from them. Allow the data to be modified in the mdb (xls) file
and then pushed back into the ADT drawing file. In this scenario, the data
editor would pull and push the data. FYI, this would require a copy of ADT be
running in the background.
3. Write a mix of the two, that would provide the data control that you
There are a couple of sample VBA apps floating around in the customization
newsgroup that show how to do the first one of these (writing to Excel). Writing
to an Access file is about the same using Microsoft ADO.
1. Who controls the data?
2. What type of data can be edited outside of ADT. For example, you could
allow the door width to change, but do you want to?
3. Where does the data live? If it's inside of ADT, then Access and Excel
would be used as editors, and the "save" command in Access would trigger an
update of the drawing files. If the data lives outside of ADT, then you need to
put tools in place to keep the data in sync. I would suggest a sync at start and
end of the session, with a manual update for in between. There are tools
(reactors) that could be used to continually update the external database, but I
would evaluate the impact of them on drawing performance before using them.
A couple of tips:
1. Record in the external database the drawing name and Handle of the
2. Data can be added to objects in ADT with ActiveX. For example, if you have
100 doors in a plan and only 90 have data attached, the other doors could have
the property data attached via ActiveX.
3. Automatic property data should be marked "read only" in the external file
so that external editors won't waste their time trying to change it.
I hope these suggestions help.
API Product Manager, Building Industry Division
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.