Open Edit Shared Parameters dialog from Revit API

Open Edit Shared Parameters dialog from Revit API

SwainStrain
Enthusiast Enthusiast
576 Views
2 Replies
Message 1 of 3

Open Edit Shared Parameters dialog from Revit API

SwainStrain
Enthusiast
Enthusiast

Hello everyone, 

 

a client asked me to add a button to the UI of my plugin that opens the Edit Shared Parameters dialog of Revit.

 

2021-11-23 12_12_47-Autodesk Revit 2020.2.5 - [Sample Project R20.rvt - 3D View_ {3D}].png

 

Is it possible? Maybe through a Postable Command?

Thank you very much for your help!

0 Likes
Accepted solutions (1)
577 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

Yes, I would assume that PostCommand would work well for that use case. Here are some articles on the topic that describe how you can find out whether it is supported and if so, how it can be implemented:

 

https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.3

  

I hope it works out and would appreciate if you let us know how you end up implementing it. Thank you!

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

SwainStrain
Enthusiast
Enthusiast

Many thanks @jeremy_tammik , these few lines of code solved the problem:

 

UIApplication uiapp = commandData.Application;
         UIDocument uidoc = uiapp.ActiveUIDocument;
         Document doc = uidoc.Document;

         var name = "ID_FILE_EXTERNAL_PARAMETERS";
         RevitCommandId id_addin = RevitCommandId.LookupCommandId(name);

         uiapp.PostCommand(id_addin);

 

 

0 Likes