Hi,
I have an issue with getPosition() of text entity with this scenario :
I add a text with : position X
I move it to : position Y
and then I do undo : I ask for position, and I get position Y !! while I see in their proprties position X as expected.
It's look like to mee that when I ask for position, it dosen't take the new value or it needs a refresh.
Thanks.
Issue with getPosition() of text entity
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.
Re: Issue with getPosition() of text entity
Could it be that you are working with a copy of the entity, not the real entity? Make sure that you query (re-query) the entity from the document based on its ID.
document.queryEntity(..) always gives you a copy of an entity. That copy does not reflect changes in the drawing. Also, modifying that object has no effect on the drawing (without going adding it to an operation, etc).
document.queryEntity(..) always gives you a copy of an entity. That copy does not reflect changes in the drawing. Also, modifying that object has no effect on the drawing (without going adding it to an operation, etc).