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

Change trap units using javascript

Engaged ,
Apr 11, 2023 Apr 11, 2023

Is it possible to change trap units from pixels to millimeters using javascript. By default, trap units are set on pixels, i need to change it to millimeters using javacsript. I use this script to complete traping, and it works correct only if units are manualy changed to millimeters. How to imporve this?

    var idTrap = charIDToTypeID( "Trap" );
    var desc6698 = new ActionDescriptor();
    var idWdth = charIDToTypeID( "Wdth" );
    var idRlt = charIDToTypeID( "#Rlt" );
    desc6698.putUnitDouble( idWdth, idRlt, 0.566895 );
    executeAction( idTrap, desc6698, DialogModes.NO );

 

Screenshot 2023-04-12 at 08.30.34.pngexpand image

TOPICS
Actions and scripting
397
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
Engaged ,
Apr 11, 2023 Apr 11, 2023

Or just to alert user that units are not in millimeters...

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 ,
Apr 12, 2023 Apr 12, 2023
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
Engaged ,
Apr 12, 2023 Apr 12, 2023
LATEST

Obviously we didn't chew it all 🙂 It was two years ago, i hope there are some updates 🙂

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