Community
Navisworks Forum
Welcome to Autodesk’s Navisworks Forums. Share your knowledge, ask questions, and explore popular Navisworks topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connect MS Access via Datatools

2 REPLIES 2
Reply
Message 1 of 3
madisen.lane
926 Views, 2 Replies

Connect MS Access via Datatools

Hi!

 

I am relatively new to the world of Navisworks, and to any type of computer programming. I am trying to connect various Navisworks drawings to MS Access tables, and am having quite a bit of trouble. I think my problem is somewhere in the "Connection" area, but I could have something wrong with the SQL String, as well.

 

The Connection box reads:

DBQ=C:\Users\madisenl\Documents\6_6\6_6_12Test.accdb;DefaultDir=C:\Users\madisenl\Documents\6_6;Driver={Microsoft Access Driver (*.mdb, *.accdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UID=admin;UserCommitSync=Yes;

 

The SQL String reads:

SELECT * FROM 6_6_12 Test1 WHERE "Revit ID"=%prop("User Data","REVIT_ID")

 

The other component to this is that I am trying to make this work with a selection set. So, I'm currently testing on a set that has 4 highlighted members to the table. I created a User Data tab and entered the REVIT_ID property. Would this have any influence on how the Data Tools connection works?

 

Any help would be much appreciated. If you need more information to figure out the problem, I would be happy to provide it. Thanks!

 

Madi lane

2 REPLIES 2
Message 2 of 3
JeffH_ADSK
in reply to: madisen.lane

The quickest way to debug DataTools is to strip off the WHERE clause so that your query returns the entire table. Clicking on anything in the model should then give you a view of the table. If it doesn't, either your SELECT is incorrect (and that's hard with three out of the four symbols being SELECT * FROM), or more likely the connection string.

 

Some things to check (forgive the level of simplicity here; I'm just being thorough):

 

You do have an Access driver available on your PC in the appropriate platform for NW (32-bit vs 64-bit) (i.e. the dropdown in setup directly in Navisworks lists one)?

 

You have mapped some fields in the right-hand pane of the DataTools link setup? Without mapping, the fields will be retrieved but not displayed.

 

You have enabled the DataTools link (the checkbox in the main view of DataTools links)?

 

You have a NW model item with properties of category User Data, with a name/value pair of REVIT_ID to a value in the table. You are clicking on that item to retrieve properties & test your connection?

 

You have a table called 6_6_12 Test1 and it has a column called Revit ID?

 

Overall the strings look fine to me.

 

Our testing has primarily been with MDB files rather than ACCDB, but as long as the ODBC driver does the hard part of running the SQL query, it should be fine.

 

Hope that helps,

 

Jeff



Senior Software Engineer
Navisworks
Autodesk Ltd.
Message 3 of 3
lizqutar
in reply to: JeffH_ADSK

Jeff

How about to connect Navisworks with SQL database (mdf)? Is it possible? Any simple example?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report