Copy link to clipboard
Copied
I have only a rudimentary knowledge of developing/programming and am looking to create a fairly simple plugin that can be called to check the illustrator version that a document was saved as. I've found this in the API:
/** Retrieves the version of the Illustrator file format in which
the current document was last saved. (Note that this function returns
a constant value, not an error code.)
@Return The version number, an \c #AIVersion value, or 0 if the
version is unknown or the file is not an AI file.
*/
AIAPI int (*GetAIVersion) ();
Other than that though, I don't even really know where to start. Any help would be greatly appreciate.
Thanks,
Chris
Copy link to clipboard
Copied
Have you tried that function and it didn't seem to work or are you looking for general level help on getting started? If the latter, your best bet is to get a sample plugin up & running and then try sticking in that call to try it out.
As for the GetAIVersion() call, I assume it returns an integer that corresponds to one of the items in this list:
kAIVersion1 = 1,
kAIVersion88,
kAIVersion3,
kAIVersion4,
kAIVersion5,
kAIVersion6,
kAIVersion7,
kAIVersion8,
kAIVersion9,
kAIVersion10,
kAIVersion11,
kAIVersion12,
kAIVersion13,
kAIVersion14
Coincidentally (or maybe not!), the integer is probably the same as the version of Illustrator. I.e. 10 means AI10, 11 means AICS, 12 means AICS2, etc.
Copy link to clipboard
Copied
this is how to use this method:
int _AIVersion = sAIDocument->GetAIVersion();
As Andrew said, the returned value is the version number.
14 for CS4
13 for CS3
12 for CS2
and so on
Regards, Thomas.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now