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: 

Revit API in VSTO Project

1 REPLY 1
Reply
Message 1 of 2
sasuarezr
121 Views, 1 Reply

Revit API in VSTO Project

Hi everyone,

 

I would like to know if it is possible to use the Revit API inside an Excel VSTO project, and if so then how should I set up the project in Visual Studio. What I want is to be able to interact with a Revit file from an Excel Add-In through a custom Excel ribbon tab made in a VS Excel VSTO Add-In project.

 

Thanks in advance,

 

Sincerely, Santiago

Labels (2)
1 REPLY 1
Message 2 of 2
jeremy_tammik
in reply to: sasuarezr

No, not directly:

    

The Revit API requires a valid Revit API context. Such a context is only provided within the event handler of a Revit API event. Such an event requires a running Revit add-in and a running Revit session. 

  

Yes, indirectly:

  

You can presumably achieve what you need anyway, by implementing a Revit add-in that defines an external event:

  

https://www.revitapidocs.com/2024/05089477-4612-35b2-81a2-89c4f44370ea.htm

  

You can raise the external event from your Excel add-in and access the Revit API in the event handler.

  

Jeremy Tammik, Developer Advocacy and Support, The Building Coder, Autodesk Developer Network, ADN Open

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

Post to forums  

Autodesk Customer Advisory Groups


Rail Community