Copy link to clipboard
Copied
Hello everyone,
Im currently discovering adobe acrobate and i encounter some difficulties. I'm working on a railroad map with stations(represented as checkboxes) and segments between the stations. I used the comment option to draw segments of my network on my map, with connected lines. The aim of my work is to show wich segment is in maintenance and wich are still available.I put checkboxes between each segments. When a checkbox is checked i want the segment before the checked box to be colored as green and if the box is not checked or unchecked the segment color is set to red.i put an example of the map and what i need (i made it manually but i need it to be automatic).
The probleme, I dont know how can I change the color of the colored line by checking the box and I don't find so much stuff that suit well my problem.
Thank you in advance
Nelson
At checkbox properties->Action->MouseUp->Run Javascript add this code:
this.getAnnot(0,"Your annot name goes here").strokeColor = event.target.value == "Off" ? color.red : color.green;
To find your annot(drawing) name, select your annot and press CTRL+J
now in console window that pop paste this code:
this.selectedAnnots[0].name;
and press Enter to get name, now copy that name and put it into code where says "Your annot name goes here".
In the console window select the whole script and press ctrl + enter.
Copy link to clipboard
Copied
At checkbox properties->Action->MouseUp->Run Javascript add this code:
this.getAnnot(0,"Your annot name goes here").strokeColor = event.target.value == "Off" ? color.red : color.green;
To find your annot(drawing) name, select your annot and press CTRL+J
now in console window that pop paste this code:
this.selectedAnnots[0].name;
and press Enter to get name, now copy that name and put it into code where says "Your annot name goes here".
Copy link to clipboard
Copied
Thanks a lot i think this might work but i encountered a litle problem in the window wich pop when ctrl + j on my annot i can't paste the code or write anything in the javascript section is that normal ?When i put the code on the console window and press enter nothong happens 😕
Copy link to clipboard
Copied
In the console window select the whole script and press ctrl + enter.
Copy link to clipboard
Copied
Thanks it work !!!