Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem on exporting GBXML file using my own ribbon

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
thailandbimuser
558 Views, 4 Replies

Problem on exporting GBXML file using my own ribbon

thailandbimuser
Contributor
Contributor

I created my own ribbon in Revit 2019. I want to export model data into gbxml file by clicking "Export GBXML" pushbutton that I created.

1.jpg

 

After that, I defined the location and clicked to save the XML file.

3.jpg

 

But there was a warning appeared as picture below. Could you suggest any solution? Thank you in advance.

70100535_1654698464660257_4260590051345301504_n.jpg

0 Likes

Problem on exporting GBXML file using my own ribbon

I created my own ribbon in Revit 2019. I want to export model data into gbxml file by clicking "Export GBXML" pushbutton that I created.

1.jpg

 

After that, I defined the location and clicked to save the XML file.

3.jpg

 

But there was a warning appeared as picture below. Could you suggest any solution? Thank you in advance.

70100535_1654698464660257_4260590051345301504_n.jpg

4 REPLIES 4
Message 2 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support

Hi @thailandbimuser ,

This exception is thrown when one of the arguments provided to a method is not valid.

so the problem may be with the Export Method .

In your code Please check whether you have provided a proper file name, the proper folder name and also check whether you set GBXML ExportOption properly.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Hi @thailandbimuser ,

This exception is thrown when one of the arguments provided to a method is not valid.

so the problem may be with the Export Method .

In your code Please check whether you have provided a proper file name, the proper folder name and also check whether you set GBXML ExportOption properly.


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 3 of 5

thailandbimuser
Contributor
Contributor

Hi, 

 

I think I identified the file name and folder name, as well as set GBXML ExportOption already. Could you please help consider my source code and suggest? Thank you very much.

 

code.jpg

0 Likes

Hi, 

 

I think I identified the file name and folder name, as well as set GBXML ExportOption already. Could you please help consider my source code and suggest? Thank you very much.

 

code.jpg

Message 4 of 5

naveen.kumar.t
Autodesk Support
Autodesk Support
Accepted solution

Hi @thailandbimuser ,

I think the problem may be with the GBLEXPORTOPTIONS.

You need to set the energy model type from which gbXML will be exported.

 GBXMLExportOptions option = new GBXMLExportOptions();

//Depending on your project elements set the exportenergymodeltype option.ExportEnergyModelType = ExportEnergyModelType.BuildingElement; (or) option.ExportEnergyModelType = ExportEnergyModelType.SpatialElement;

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Hi @thailandbimuser ,

I think the problem may be with the GBLEXPORTOPTIONS.

You need to set the energy model type from which gbXML will be exported.

 GBXMLExportOptions option = new GBXMLExportOptions();

//Depending on your project elements set the exportenergymodeltype option.ExportEnergyModelType = ExportEnergyModelType.BuildingElement; (or) option.ExportEnergyModelType = ExportEnergyModelType.SpatialElement;

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Message 5 of 5

thailandbimuser
Contributor
Contributor

Hi,

 

Problem is solved. Thank you very much.

 

 

 

0 Likes

Hi,

 

Problem is solved. Thank you very much.

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report