Hello!
I would like to create an External application which opens a dialog and do some stuff after it. My dialog would be a WebView or something like that. Is it possible? Could someone recommend a good example. Which direction is worth to follow? I search on Autodesk APP Store and found BimObject or ProdLib plugins, which have really nice UIs. Are they use WPF or some web framework?
Does your question have anything whatsoever to do with the Revit API?
If so, would you care to explain what?
@balintTX9QH wrote:Could someone recommend a good example.
The DockableDialogs example in the SDK is WPF. It's good in that it shows the various API's necessary to build an external app, but it was not designed to be a great WPF reference.
I see some results seaching for 'revit api wpf sample':
https://duckduckgo.com/?q=revit+api+wpf+sample
Haven't checked them out in detail myself.
Some are shared by The Building Coder as well:
https://thebuildingcoder.typepad.com/blog/wpf
It would indeed be great to have one single recommended best-practice starting point.
Have you checked out Ali Asad's suggestion?
https://thebuildingcoder.typepad.com/blog/2019/01/room-boundaries-to-csv-and-wpf-template.html#3
This StackOverflow thread discusses how to create one starting with the DockableDialogs SDK sample:
https://stackoverflow.com/questions/40096793/best-starting-point-for-wpf-revit-add-in
Cheers,
Jeremy
Hello Jeremy.
Thank you for your reply.
Yes. Because I would like to start an ifc export process with revit API, then upload the created model to my server. It needs a quite nice UI. Have you checked the example plugins? BIMObject and Prodlibs. Do you think they develop UI with WPF? I suspect some web framework or something like that.
Hello Guys!
I hope I find the solution. With DotNetBrowser I can integrate a Chromium-based browser into Revit app. I tried it and it works fine.
https://www.teamdev.com/dotnetbrowser
If anyone has experience with using this, please share. Thank you for your previous replies.
Cheers, Balint
Thank you for sharing your solution!
I shared it and out discussion for posterity here:
https://thebuildingcoder.typepad.com/blog/2019/09/ui-top-forms-buttons-web-etc.html#4
So you are using a commercial component?
That is obviously simpler than the recent similar non-commercial DIY approach using CefSharp:
Hello Jeremy.
I am going to use DotNetBrowser commercial component instead of CefSharp open source. I have tried CefSharp but unfortunately I ran into a frequent problem, that CefSharp.Core.dll could not be loaded. That means one of the components is missing. I had no time to investigate where the exact problem is. For me DotNetBrowser is more clear and well documented. They have really good examples and quite good interaction with JavaScript.
I think it would be really helpful for other developers to share a complete solution about this topic. Maybe a correct solution for CefSharp also would be useful. If you think I will be happy to share my experiences.
Cheers,
Balint
Dear Balint,
I totally understand your choice.
Yes, I think a small working sample snippet showing how you use it might be interesting for all.
The thread I pointed out above does explain how ton solve the problem you describe with CefSharp. Sample solution source code is provided.
Cheers,
Jeremy