AI Document-View synchronization issue
My plugin works as following:
1. Delete a layer named "X1"
2. Add a layer "X1" and also add some art on that document
3. RedrawDocument()
4. SyncDocument from AIDocumentSuite
5. Saves changes through code
6. SyncDocument from AIDocumentSuite
7. RedrawDocument from AIDocumentSuite
Redraw at step 3 works fine. but ...redraw at step 7 loads document of state which is during "opening" the document (before step 1 of the above steps).
When I close the document and open again, I can see that the changes have been saved successfully.
A document-reload will be a work-around solution for me right now. But I don't find the reload document function either.
What might be the possible reasons for this document's Redraw failure ?
P.S. : I have used GetDocument() multiple times as a validation to check if any document is open or not. Can this be a problem, if it return a copy of the document for redraw.