Hello,
In myCustomEnt.h
class myCustomEnt: public acdbcurve{
public:
void CalSomething(void);
...
private:
AcArray<Int32> mType;
...
}
----------------------------------------------------------------------
in myCustomEnt.cpp
myCustomEnt::myCustomEnt(){ //Default Constructor
CalSomething(void);
}
void myCustomEnt::CalSomething(void){
acutPrintf(_T("%d\n"), mType.length()); // mType.LogicalLength()=14 in the initial input
for (int i=0; i < Count; i++){ //Count = 14
Int32 type = mType.at(i);
}
}
Acad::ErrorStatus myCustomEnt:: subTransformBy(...){
CalSomething(void);
}
The expected output should be 14 only in the comment screen.
But, I see the output
1
2
3
...
13
14
Why the AcArray LogicalLength unexpected changed? This will lead the assertion failed, if NDEBUG not defined.
What should I do to avoid this assertion failure?
Thanks,
Jack
The portion of the code that you posted is not complete and will not compile. I'm not sure I understand the problem, but if the size is not what you expect, then you should determine when and why it changed.