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

Change trap units using javascript

Engaged ,
Apr 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

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.png

TOPICS
Actions and scripting

Views

173

Translate

Translate

Report

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 11, 2023 Apr 11, 2023

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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