Revit API

Reply
Contributor
ngoc.trang
Posts: 12
Registered: ‎03-24-2011
Message 1 of 9 (622 Views)

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

622 Views, 8 Replies
03-30-2011 12:36 AM

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.

Contributor
sub.baburajan
Posts: 15
Registered: ‎04-18-2010
Message 2 of 9 (607 Views)

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

04-04-2011 07:52 PM in reply to: ngoc.trang

Registration of add-ins

 

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

 

thanks

 

Contributor
ngoc.trang
Posts: 12
Registered: ‎03-24-2011
Message 3 of 9 (604 Views)

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

04-05-2011 12:31 AM in reply to: sub.baburajan

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.

Contributor
bsyap
Posts: 18
Registered: ‎06-06-2010
Message 4 of 9 (574 Views)

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

04-12-2011 07:39 PM 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.

Contributor
ngoc.trang
Posts: 12
Registered: ‎03-24-2011
Message 5 of 9 (568 Views)

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

04-13-2011 12:48 AM 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.

Contributor
bsyap
Posts: 18
Registered: ‎06-06-2010
Message 6 of 9 (556 Views)

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

04-14-2011 08:41 PM in reply to: ngoc.trang

Hi, ngoc.trang

 

Thanks for the quick reply. :smileyhappy: 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?

Contributor
ngoc.trang
Posts: 12
Registered: ‎03-24-2011
Message 7 of 9 (551 Views)

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

04-15-2011 12:10 AM 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.

Contributor
sub.baburajan
Posts: 15
Registered: ‎04-18-2010
Message 8 of 9 (542 Views)

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

04-17-2011 01:01 AM in reply to: ngoc.trang

Hi Ngoc Trang,

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

Thanks

Contributor
ngoc.trang
Posts: 12
Registered: ‎03-24-2011
Message 9 of 9 (537 Views)

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

04-18-2011 01:06 AM in reply to: sub.baburajan

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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.