Path to the DLL

Path to the DLL

Anonymous
Not applicable
1,039 Views
1 Reply
Message 1 of 2

Path to the DLL

Anonymous
Not applicable

Hi

I activate a dll file, by a button in the ribbon, I need to get the path to the dll file how do I do that ?

 

Regards Anders

0 Likes
Accepted solutions (1)
1,040 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Anders,

 

Thank you for your query.

 

However, please invest a miniimum of effort searching for an answer yourself before submitting the question here.

 

Every single sample that implements an external application with a custom ribbon panel demonstrates how to do this, for example here:

 

http://thebuildingcoder.typepad.com/blog/2015/03/thin-lines-add-in-using-ui-automation.html

 

https://github.com/jeremytammik/ThinLines/blob/master/ThinLinesApp.cs#L98

 

  PushButtonData buttonThin = new PushButtonData( 
    buttonThinName, buttonThinName, 
    System.Reflection.Assembly.GetExecutingAssembly().Location, 
    typeof( Command_ThinLines ).FullName );

You can simply store the path like this:

 

  Assembly exe = Assembly.GetExecutingAssembly();
  string path = exe.Location;

I hope this helps.

 

Best regards,

 

Jeremy



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