Hello,
My question is about persistence of Entity Id :
I have a Transaction listener that is installed at qcad start-up, for showing entity line Id when it's affected.
And I do this scenario :
I draw a Line base on tool Line2P, and I see through the listener, that the line entity have 47 as Id (screen1).
Whatever change I make on the line after that I keep seeing the same Id 47 (screen2).
I save the document with name myTestObjId, I close qcad.
And I open this my document myTestObjId, now I see onother Id for my line : 48 !! (screen3)
If Entity Id, isn't persistent after save, what information is persistent after save ?
(I join screenshots that shows the scenario described with the results)
Thanks in advance !
Entity Id change after save
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Entity Id change after save
- Attachments
-
- screen1.PNG (68.79 KiB) Viewed 5463 times
-
- screen2.PNG (77.07 KiB) Viewed 5463 times
-
- screen3.PNG (67.36 KiB) Viewed 5463 times
Re: Entity Id change after save
Object IDs are not persistent.
Object handles should be used if a persistent reference to an object is needed.
RObject::getHandle();
Object handles should be used if a persistent reference to an object is needed.
RObject::getHandle();
Re: Entity Id change after save
Thanks for responding, but still I have the same issue using handles :
Before I save the document my object handle is 47.
And after I save the document and I reopen it, handle of object changed to 89.
I need to have something persistent after save and reopening.
Thanks again !
Before I save the document my object handle is 47.
And after I save the document and I reopen it, handle of object changed to 89.
I need to have something persistent after save and reopening.
Thanks again !
Re: Entity Id change after save
I just saw that you are using dxflib to write the file.
I should have mentioned that handles are only persistent using the QCAD Professional Teigha based filters for exporting / importing DXF/DWG.
I should have mentioned that handles are only persistent using the QCAD Professional Teigha based filters for exporting / importing DXF/DWG.