How to save the doc to file ?

In MFC example "02_1_SampleTopologyPrimitives" I want to make a function which saves current contents into a file.

In the Doc class, I think, a Instance of Handle_AIS_InteractiveContext has all the information. Is there any function that support save in this case ?

Msaaf Omar's picture

Let's name The Class myClass This Class will contain Objects belonging to Cascade, Let's say TopoDS_Shape.

In order to save your object, you have to use the macro provided by MFC named IMPLEMENT_SERIAL(....) //Look in MFC help Then you have to create a Serialize function fot the class myClass, this provided in the MFC help and in the CASCADE documentation. In the function serialize, you have to create the mecanisms to save your topods_shape by using persistent data of this class namely PTopoDS_Shape. all this is well illustrated in the 09_sampleserialize provided by matra. Hope it helps Best regard Omar Msaaf

changyoon's picture

Thanks for your response.

According to your answer, I try to execute 09_sample program.

But error occurs.

Error is "LINK : fatal error LNK1104: cannot open file "ShapeSchema.lib" "

I can't find "shape schema.lib".

It doesn't exist in my computer.

Where can I find it?

Please, help me again.

p-carret's picture

Under Windows NT :

1) ShapeSchema.lib is in one of the package on the website. Did you download all ? It will be installed in a directory like : D:\Program Files\Matra Datavision\OpenCASCADE\CAS3.0\Windows_NT\libd

2)In Developer Studio : Check in Tools/Options the lib directory combo box you must provide ther the path D:\Program Files\Matra Datavision\OpenCASCADE\CAS3.0\Windows_NT\libd