Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

check document version

New Here ,
Jul 20, 2009 Jul 20, 2009

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

TOPICS
SDK
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Jul 20, 2009 Jul 20, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 22, 2009 Jul 22, 2009
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines