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

Is there any equivalent of Art Dictionary in extendscript?

Participant ,
Jul 12, 2017 Jul 12, 2017

Hi guys,

I am in process of converting c++ plugin code into html extension. I have came across below code snippet. I am not sure whether there is any equivalent of Art Dictionary in extend script. If there is any please point me there.

I have skimmed documents named "Illustrator Scripting Reference - JavaScript_CC2015", "JavaScript-Tools-Guide.pdf", "CEP_6.1_HTML_Extension_Cookbook.pdf" found on github/devnet etc.

Thanks in advance,

Dnyanesh

TOPICS
Scripting
874
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
Valorous Hero ,
Jul 17, 2017 Jul 17, 2017

What is "Art Dictionary" ?

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
Participant ,
Jul 17, 2017 Jul 17, 2017

Silly-V​

I have came across a code in plugin,

  1. /Get the AI file dictionary 
  2.   AIDictionaryRef dictionary; 
  3.   error = sAIDocument->GetDictionary(&dictionary); 
  4.  
  5.  
  6.   //Get the ADS BOM count, incremented on ever drag/drop and apply color event 
  7.   AIDictKey bomCountKey  = sAIDictionary->Key(BOMCount); 
  8.   ai::int32 bomCount = 0
  9.   sAIDictionary->GetIntegerEntry(dictionary, bomCountKey, &bomCount); 
  10. #ifdef MAC_ENV 
  11.   std::string bomKeyStr = BOMPrefix + CSEUtil::getCSEStringFromInt(bomCount); //std::to_string((long double)bomCount); 
  12. #elif defined WIN_ENV 
  13.   CSEString iStr  = CSEUtil::getCSEStringFromInt(bomCount); 
  14.   std::string s( iStr.begin(), iStr.end() ); 
  15.   std::string bomKeyStr = BOMPrefix + s;//std::to_string((long double)i);; 
  16. #endif 
  17.   AIDictKey dictKey = sAIDictionary->Key(bomKeyStr.c_str()); 

 

I see on line number 3, a dictionary object is being retrieved from document. I assume dictionary is kind of mapping structure with key and value pairs.

When I observe DOM tree of Document Object in extendscript toolkit CC , I could not see dictionary.

Please Correct me if I am doing something wrong.

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
Valorous Hero ,
Jul 18, 2017 Jul 18, 2017
LATEST

This looks like a component of the SDK domain.

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
Community Expert ,
Jul 17, 2017 Jul 17, 2017

Extendscript doesn't support Art Dictionary.

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