Wednesday, November 11, 2009

Creating new tables in the project which are accessible in the Access Database


I decided to create a table for 'Entourage'. This includes human beings, vehicles and other such objects in the Revit Library. So, this was started by once again opening the RDBLink.cs proj in Visual C#. The project was studied in detail by using an Instance of Door to see how the table was created for it.
The first step to creating a new table was to add Entourage as a new Instance in the RDBLinkData.resx code tab. Next the new table name was added as data in another RDBLinkData.resx code tab where the various new tables are added by their name values.


Next the RDBMetaDataInitialisation.cs code tab was opened and (using the Door Instance as example) new columns for ID, Design Options, Model Comments and Level were added. The ID column was specified as the Primary Key and the Design Option and Level were designated as Foreign Keys.



The RDBLinkDataDesigner.cs would then automatically generate the required codes for it when the project is compiled using Build. Then the project is exported into the ODBC Database once again using RDBLink in Revit Architecture as done earlier.
Finally, the MS Access database is opened to check if the Entourage table has been created. Also the Room Associations table can be used to compare the IDs with respect to the doors, windows and entourage table.



No comments:

Post a Comment