Sat, 12/09/2017 - 02:36
Hi, I'm trying to save a document with some data in it and it fails.
Handle(XCAFApp_Application) anApp = wxGetApp().GetOCCApp();
Handle(TDocStd_Document) aDoc;
anApp->GetDocument(1,aDoc);
TCollection_ExtendedString theStatusMessage;
aDoc->ChangeStorageFormat(TCollection_ExtendedString("XmlXCAF"));
PCDM_StoreStatus status = anApp->SaveAs(aDoc,"C:\Documents\file.XmlXCAF",theStatusMessage);
Error message is:
driver failed; reason:Could not found the resource definition:XmlXCAF.StoragePlugin
Wed, 12/13/2017 - 22:11
I got it, I had to load the drivers for it:
BinXCAFDrivers::DefineFormat (occApp);
XmlXCAFDrivers::DefineFormat (occApp);