SDK 2023 problem: getting current document
Hey!
I have just migrated from sdk 2022 v4 to sdk 2023 v1 while developing a plugin for Illustrator. I have encountered an issue that some functions that worked well in sdk 2022 do not work in 2023. Mostly they are related to getting the current document and information about it (count the number of layers, getting current document handle, activating a document by index, exporting the document to pdf). Documentation did not seem to change, the solution compiles correctly, other functions related to layers and documents seem to work (like getting a document or layer by index - not activating them though).
e.g. :
sAIDocumentList->Activate(documentHandle, true); // error DOC?
sAILayer->CountLayers(&count); // count returns 0 whichever the document is
sAIDocument->WriteDocumentWithOptions(f, kAIPDFFileFormat, kFileFormatWrite, d, false, params); // error DOC?
sAILayer->GetNthLayer(i, &layerHandle); // works correctly
sAIDocumentList->GetNthDocument(&documentHandle, ind); // works correctlyHas anyone else encountered a similar issue? How can it be solved?