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

Using data from excel to draw in revit via a macro

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
1209 Views, 2 Replies

Using data from excel to draw in revit via a macro

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?

2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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

Message 3 of 3
ArunNDinesh
in reply to: Anonymous

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.

Post to forums  

Rail Community


Autodesk Design & Make Report