I'm using Revit Architecture 2011 and have created an external command addin to export building data to gbxml format and pass it on to another process. I'd also like to include the 'Export GBXml - Settings' dialog (in the same way as you can do from Revit File command) as part of the addin so users can resolve any issues before exporting. Is there any way I can get access to this dialog via the API?
Thanks in advance
Hi
With the Revit API, we will not be able to use the dialog as it is. But we can always create our own dialog which can handle user inputs for the Export settings (similar to what we have in the Revit product UI). This custom dialog that you create in your add-in can use the GBXMLExportOptions API to handle the export settings.
The ImportExport SDK sample contains code which shows the usage for GBXMLExportOptions. Please review the SDK sample and see if it helps.
cheers
Thanks for the reply Saikat, it's as I suspected.
I assume by Export settings you mean the General tab of the Revit dialog. I was also interested in giving the users a chance to view the warnings is it possible to get hold of these via the API? Also, is there any way I could display and manipulate the building as in your dialog, left hand pane, do you have a Windows forms control for example?
Thanks again
Regarding your additional query on GBXml settings, I see that the GBXMLExportOptions is actually not used currently and is a placeholder for future enhancements - when this can be used to set the settings during the export to GBXml.
Regarding failure API, the following links should be of help
http://thebuildingcoder.typepad.com/blog/2010/04/failure-api.html
http://thebuildingcoder.typepad.com/blog/2010/11/failure-api-take-two.html
Regarding viewer query, you can take a look at the Preview Control (new in Revit 2013 api) and that should help with what you are looking for.
http://thebuildingcoder.typepad.com/blog/2012/03/revit-2013-and-its-api.html
http://thebuildingcoder.typepad.com/blog/user_interface/#23
Hope this helps
cheers
Saikat