I am trying to export data (such as elements geometry and location) from excel to revit and then use this data to draw up a basic structure, within a single macro (using V.B.Net language). I cant figure out how to get the data into the macro as well as how to use this data to draw objects such as wall. Is even possible to do?
Assuming I can get the data into the Revit macro, i was then thinking that I would use it to draw each element by:
- first defining where each corner of each element is e.g. dim point1 As New XYZ(data from excel)
- draw a line between this points e.g. Dim line1 As line = line.createbound(point1, point2)
-turn the line into a wall
But turning the line into a wall doesn't seem to be working, is there away of simply creating a wall based of there x,y,z coordinates from a datum?
The question is very broad and I don't think that you will immediately get direct answer.
Good news - Everything that you wrote above is possible.
To get data from Excel is not really a REVIT API question so you may need to expore the namespace:
microsoft.office.interop.excel
For creating elements is Revit please explore Revit SDK. Normally you do this through static methods incorporated in a given object class e.g:
http://www.revitapidocs.com/2015/d2848332-daca-2bf1-4aca-21ea21937758.htm
or through instance methods assigned to given Document (Creation) class e.g:
http://www.revitapidocs.com/2015/d8e0a91a-b062-3a86-6d8e-779534459ff4.htm
hope that helps, Luki
Hi @Anonymous Please update the status. Is it possible to call the REVIT database via excel VBA. could you please share the sample VBA if so?
Thanks
Can't find what you're looking for? Ask the community or share your knowledge.