TDocStd_Application

Hi !

Are there any examples using the TDocStd_Application and TDocStd_Document classes available ?

Mikael

Mikael Aronsson's picture

Ok, I created a new application class, subclassed from TDocStd_Application, but when I create an object of this class with new I get the following message in the Failure exception:

v:\msdev\project\test\Debug>type x POP --> on est dans MetaGraphicDriverFactory avec AShrName == v:\msdev\project\c ascade\cas3.0\windows_nt\dll\opengl.dll POP : on est dans OpenGl_GraphicDriver::OpenGl_GraphicDriver avec AShrName == v: \msdev\project\cascade\cas3.0\windows_nt\dll\opengl.dll POP : on est dans MetaGraphicDriverFactory apres new AShrName == v:\msdev\proje ct\cascade\cas3.0\windows_nt\dll\opengl.dll 0x006B05D0 : Plugin_Failure: could not find the resource:a148e300-5740-11d1-a904 -080036aaa103.Location aaa103.Locatioa

Does the TDocStd_Application use the plugin interface, and in that case for what ?, I guess I have missed something here completley, but what.

I am also not sure what the ResourcesName and formats should return ?, I have implemented them as follows for now:

Standard_CString rApplication::ResourcesName() { return( Standard_CString( "C:\\test.dat")); }

void rApplication::Formats(TColStd_SequenceOfExtendedString& Formats) { Formats.Append( TCollection_ExtendedString( "a_test_format")); }

Does the resource file need to exist, or should it be a key to the registry on Windows NT ?

Can I use any name for the format string ?

Mikael

j-riegel's picture

Hi, I faced the same problem, the (undocumented) solution is to copy the needed Plugin from the ShapeViewer Sample (It's not distributed with the OpenCascade sources) You have also to set some Variables (like ShapeViewer) then you can instantiated the Application class. About Format and Resource I don't know either.

Juergen

Mikael Aronsson's picture

Hi !

Thanks Juergen

Is this plugin needed for its functionality or is this just something that has to be done to make it work, what I mean is, can I catch the exception and just go on without the plugin ?, I tested this and so far it works, but I have not used the TDocStd_Application class very much yet.

Mikael

Mikael Aronsson's picture

Hi !

Ok, as far as I understand it the TDocStd_Application class needs a plugin for loading and saving the scene graph, and I could use the one included with the shapeviwer.

Is it ok to include the plugin from shapeviewer with my application ?

Is the format of this plugin documented somewhere ?

Mikael