Only one instance addin plugin

Only one instance addin plugin

sonicer
Collaborator Collaborator
469 Views
4 Replies
Message 1 of 5

Only one instance addin plugin

sonicer
Collaborator
Collaborator

How can I protect run only one instance of addin plugin?

If user run Revit 2018 and Revit 2019 on same PC...need protect only one instance.

0 Likes
470 Views
4 Replies
Replies (4)
Message 2 of 5

jeremytammik
Autodesk
Autodesk

What is 'protect run'?

 

What do you mean by 'protect'?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 5

sonicer
Collaborator
Collaborator

Sorry, meant this.


Possibility run only one instance of plugin on PC.

If user run revit 2018 and 2019 on same PC allow run only one instance of plugin.

 

thx.

0 Likes
Message 4 of 5

jeremytammik
Autodesk
Autodesk

You can easily support multiple versions of Revit with one single add-in.

 

If the Revit API calls you make have not changed between Revit 2018 and Revit 2019, simply use the same add-in for both, compiled for Revit 2018.

 

If the API calls that you use have changed, you can handle that using .NET Reflection:

 

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 5

sonicer
Collaborator
Collaborator

thx...But I think you talking about compiling plugin for multi version of revit.

 

I mean allow run only one instance of plugin.

 

0 Likes