ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

why the entity can not be closed

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
475867377
404 Views, 7 Replies

why the entity can not be closed

when i open a entity by write,it return eWasOpenForRead (82).then i open it by read,it success,then i close it ,then i open it by write,it return eWasOpenForRead (82) again.the entity is drawed by me.the code is as follow.why does this happen? 

475867377_0-1710920165041.png

 

7 REPLIES 7
Message 2 of 8
artc2
in reply to: 475867377

The eWasOpenForRead error when you try to open it for write indicates that it is already open for read by something. An object can be open for read simultaneously up to 256 times. So, when you then open it for read, you are just incrementing the openForRead count. When you then close the object, you are just decrementing the openForRead count which puts the object back to the way it was before you opened it for read - still open for read by something else.
Message 3 of 8
475867377
in reply to: artc2

thank you .but the object is drawed by me .then i read it.there is no one to read it .so it won't up to 256 times.
Message 4 of 8
835700012
in reply to: 475867377

may be your object id was open for read already?try to show us the error stats at first time for more detail.

 

Message 5 of 8
475867377
in reply to: 835700012

when i open a entity by write at first time,it return eWasOpenForRead (82).

Message 6 of 8
ynapeu
in reply to: 475867377

If you create the entity, you must close it.

Message 7 of 8
835700012
in reply to: 475867377

your entity was opened for read before u open it for write,you must close it first

Message 8 of 8
475867377
in reply to: 475867377

i have find the BUG,my mistake.it is a little tough to find it .thank you all !

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost