Skip to main content
dnyaneshlb
Known Participant
July 12, 2017
Question

Is there any equivalent of Art Dictionary in extendscript?

  • July 12, 2017
  • 2 replies
  • 900 views

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

This topic has been closed for replies.

2 replies

Ten A
Community Expert
Community Expert
July 17, 2017

Extendscript doesn't support Art Dictionary.

Silly-V
Legend
July 17, 2017

What is "Art Dictionary" ?

dnyaneshlb
Known Participant
July 18, 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.

Silly-V
Legend
July 18, 2017

This looks like a component of the SDK domain.