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: 

[Plugin Installer] How to get the installation folder of Revit ?

8 REPLIES 8
Reply
Message 1 of 9
ngoc.trang
2077 Views, 8 Replies

[Plugin Installer] How to get the installation folder of Revit ?

Hi everyone,

 

All is in the title. I've finished my plugin and would like to deploy it on the web as a single installer. And I need to add some dll in the Revit install foler. How can I do that ?

 

Thank you for your time,

Ngoc-Trang.

8 REPLIES 8
Message 2 of 9
babu.rajan
in reply to: ngoc.trang

Registration of add-ins

 

Check out "Getting Started with the Revit API"  attached from SDK

 

thanks

 

Message 3 of 9
ngoc.trang
in reply to: babu.rajan

Hi  baburajan,

 

Thank you for your answer, but I've already read this document and it seems that you've misunderstood my question. I don't ask for the folder to add my .addin file.

 

But anyway, I found another solution that don't require the installation folder of Revit.

Message 4 of 9
bsyap
in reply to: ngoc.trang

Hi, ngoc.trang

 

I have the same problem as you where i have completed my plugin and i need to package it as an installer. However, during debugging my plug-in with revit api, we need to add reference to two revit dll which is RevitAPI.dll.dll and RevitAPIUI.dll where this two dll is located in Revit installatiion folder. But now i need to package the plug-in as an installer, how do i reference back this two dll, by the way, what is the copyright for it? Many thanks if you can help me on this.

Message 5 of 9
ngoc.trang
in reply to: bsyap

Hi bsyap,

 

You don't need to copy the Revit .dll in your installer because it is supposed that they are already present in the computers, on which you install you plug-in ^^ (in their Revit install folder)

 

Hope it helps,

Ngoc-Trang.

Message 6 of 9
bsyap
in reply to: ngoc.trang

Hi, ngoc.trang

 

Thanks for the quick reply. Smiley Happy I am using Revit API SDK to create my first plug-in for Revit. During debug the program, i have to add reference to two revit dll which is RevitAPI.dll and RevitAPIUI.dll where this two dll are located in my personal computer's Revit installation folder(C:\Program Files\Autodesk\Revit Architecture 2011\Program\RevitAPI.dll)  and the dll  Copy Local property is set to false(which means this will not package to the release of the plug-in). But now when i try to package this add-in as an installer, how does end user computer can run my plug-in since they do not have this two dll in their computer? 

 

May i ask

1)Do you package the Revit.dll into your plugin as well?

2)How you reference back this two dll?

Message 7 of 9
ngoc.trang
in reply to: bsyap

Hi,

 

As I say before :

1) no need. Copy Local to false is right.

2) It is automatic if the target pc has installed Revit.

Message 8 of 9
babu.rajan
in reply to: ngoc.trang

Hi Ngoc Trang,

Ok I got it. How do you end up doing it?

Thanks

Message 9 of 9
ngoc.trang
in reply to: babu.rajan

Hi baburajan,

 

At the first launch of my add-in, I can get revit install folder with :

Path.GetDirectoryName(Application.ExecutablePath);

I copy what I want there.

 

For a proper use, all I need then is to register this path to a config file, and at the unisntall I can remove my *.dll from Revit folder.

I don't know if it is the best way but it avoid me doing it from the install application.

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community