For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Is there an limitation of the SaveAs function of TDocStd_Application?

Wang Chris's picture

Dear All,

I failed to save a file about 0.5MB, while it was ok to save a file with the size about 0.38MB?
Does anyone know the problem? Thanks in advance!


sergey zaritchny's picture

Hi Chris,
There is no explicit limitation in SaveAs function.
Check differences between model1 (file with size 0.38MB) and model2 (~0.5MB).

Wang Chris's picture

Thanks for your answer, Sergey.

I found the problem might be related to the number of objects (blocks) generated. When I save a document with objects more than 50000, it fails. And it is ok to save a document with objects less than 49900 based on the testing.

So I wonder whether there is the limitation of the number of objects in the document.

Your answer is appreciated greatly.

TDF_Data::TDF_Data() :

myTransaction (0),

myNbTouchedAtt (0),

myNotUndoMode (Standard_True),

myTime (0),

myAllowModification (Standard_True)


const Handle(NCollection_IncAllocator) anIncAllocator=

new NCollection_IncAllocator (16000);

myLabelNodeAllocator = anIncAllocator;

myRoot = new (anIncAllocator) TDF_LabelNode (this);



sergey zaritchny's picture

Hi Chris,
May be you have a memory problems.
It would be better to check it.
Could you provide information to reproduce the problem,
for example, fragment of code which generates the document content to be saved.

Wang Chris's picture

Thanks for your answer, Sergey.

I attached some fragments of the codes for your reference.
They include:
Void Test();
TDF_Label TOcaf_Commands::CreateBox(…);
TOcafFunction_BoxDriver.cxx file.

Thank you for the help.


sergey zaritchny's picture

Hi Chris,
To identify the exact reason (bug/limitation/ or something else) of the described behavior
I need a compilable version of your case (allowing to reproduce the problem) plus reference to used environment:
1.OCCT version
2. Platform, OS version
3. Compiler version


Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.