Share Everywhere with VTFx Files and Envision Viewers
The Export component adds easy sharing of simulation results using the Envision VTFx format. With a few lines of code, you can export exactly what you have on the screen to a compact file that can be shown on almost any platform. You can upload the VTFx file to Ceetron Cloud and share and view it directly in the web browser on any device. You can analyze it further using HOOPS Envision Analyzer Desktop or HOOPS Envision Analyzer Cloud.
Note
Currently the Export component only works with the UnstructGrid component.
License note: The Export Component requires a license with this feature enabled. Please see License System for more info.
Export to VTFx
Add the following code to export exactly what you have on the screen to a compact VTFx.
cee::exp::ExportVTFx exporter(cee::exp::ExportVTFx::DISPLAY_MODEL_ONLY, model);
// Add properties from the view and the model
{
cee::PtrRef<cee::PropertySetCollection> propColl = new cee::PropertySetCollection;
cee::PtrRef<cee::ImageResources> resources = new cee::ImageResources;
cee::exp::PropertyBuilderVTFx propBuilder(propColl.get(), resources.get());
propBuilder.addFromModel(*model);
propBuilder.addFromView(*view);
exporter.addProperties(*propColl);
exporter.addResources(*resources);
}
// Optionally, add a thumbnail image
{
PtrRef<cee::vis::Image> thumbNailImg = new cee::Image;
view->renderToImage(640, 480, thumbNailImg.get());
exporter.setSnapshotImage(thumbNailImg.get());
}
exporter.setVendorNameAndApplication("MyCompany", "MyApp");
exporter.saveCase(myFilename);


