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

How convert int value to enum?

Enthusiast ,
Jan 05, 2016 Jan 05, 2016
LanguageType.BOKMALNORWEGIANint 8
LanguageType.BRAZILLIANPORTUGUESEint 11
LanguageType.BULGARIANint 20
LanguageType.CANADIANFRENCHint 3
LanguageType.CATALANint 17
LanguageType.CHINESEint 29
LanguageType.CZECHint 22
LanguageType.DANISHint 16
LanguageType.DUTCHint 15
LanguageType.DUTCH2005REFORMint 43
LanguageType.ENGLISHint 0
LanguageType.FINNISH

int 1

....

Above is enum language of Illus

In Dot Net: I can set:

oCharRange.characterAttributes.language=0;

But in Illustrator Script: I can't set :

oCharRange.characterAttributes.language=0;

only can set: oCharRange.characterAttributes.language=LanguageType.ENGLISH;

Because have very much languagetype, so i can't use "if"

How convert int value to enum? Thanks all.

TOPICS
Scripting
365
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
Community Expert ,
Jan 05, 2016 Jan 05, 2016
LATEST

Javascript doesn't support Enum Integer values like VB do, what I do is, I put all my enum values in an array first then use the array values, check this thread for samples

Re: Javascript enumerated objects

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