I am trying to export my Revit Schedules into a database (MySQL Workbench) and to be honest I am a bit lost as I am not very skillful in Dynamo and MySQL but, it is something that has been required in my company.
Doing some research I’ve got to the point that Slingshot package would be helpful for this but I am running into some problems.
The first one is that when I am trying to create a new Database with the node “Command.MySQL_Command” the outcome is just “FALSE” and I don’t know if the “Test Javier” Database should be created just with that or more steps are needed. (See image attach)
First issues that grabs my eye is your password code block is red meaning syntax error. “1” would be a string for 1. its erroring as you have 1".
As the Connection String Node output is not shown I am guessing that the connection string node is not creating a usable string for the command node to work.
Totally understand the password bit. Next guess would be syntax of the SQL command. It looks like the Command Code block is outputting the scheme and Exists as one word. Maybe try, "CREATE DATABASE IF NOT EXISTS" + " " + scheme for it to output “CREATE DATABASE IF NOT EXISTS test Javier” instead of “CREATE DATABASE IF NOT EXISTStest Javier”.
Otherwise you could check your port and adjust the timeouts on the connection string node. (sorry I gave up on those nodes and used python to got Microsoft SQL instead of MYSQL so this is where my knowledge ends on those nodes).
My idea is to export Revit Schedules into a SQL database where all the schedules of different projects will be stored, so if at some point someone requires me the number of “X Model” Task Chairs that we have used in 2020 projects, I can query it to the database and get a quick result. This is just a quick example.
My first idea is to export the schedules to an already set up Excel file and from there to the SQL database.
But I was also wondering if there is a way to export directly from Revit to a SQL database using Dynamo.Of course the SQL database can have some tables with columns already set up.
MySQL is not essential. I’ve chosen it because I saw this blog
Yes- the link is pretty detailed. The type of database doesn’t really matter- it is the same principle for any database. In my experience, MySQL is a little more difficult for beginners. The other option is to use the ODBC export that is built in to Revit
May as well stay with this if you’ve already got it set up. I’d suggest starting off with something simple such as a SELECT query to check the connection to the database. Once that works, build it up from there
Regardless of the technical stuff- you’d need to think about:
what happens if Revit model changes- do you try and work out what has changed- then just update the database with that data, or do you nuke the database and export everything again. Perhaps not an issue if it is just a once-off export at the end of the project
the number of objects you are interested in- if just say one object category (furniture) then it is probably pretty simple. For many categories, or taking account of issues such as design options, nested families, grouping & phasing- it gets more complicated
the problem is most likely MySQL security settings
Assuming you ticked the option to open relevant firewall ports when you installed- you may need to disable SSL. I believe this defaults to on in later versions. This is why MySQL is not the easiest for beginners
As before: start off simple- such as a SELECT query (rather than trying to create a schema)