ごんれのラボ

iOS、Android、Adobe系ソフトの自動化スクリプトのことを書き連ねています。

0.1mm未満の線幅のオブジェクトの線幅を0.1mmにする

職場で「調べて直してたら時間かかりますー」と同僚たちが話し合っていたので、「できましたー」と渡したAppleScript。

<仕様>

●0.1mm未満の線幅のオブジェクトをフィルタリングして、線幅を0.1mmにする

●path itemしか処理しないのでテキストは変更されない(アウトラインしてあるものは除く)

<注意点>

●Illustratorの内部の数値はすべてポイントで管理されているので「0.1mm=0.283pt」となる

●あえてドロップレットにしてません。理由は「ちゃんとチェックしないと危ない」から。

tell application "Adobe Illustrator"

tell document 1

set StorokeWidth_list to every path item whose stroke width < 0.2829 --線幅0.2829pt以下のアイテム取得

repeat with i in StorokeWidth_list

tell i

set stroke width to 0.283 --線幅を0.283ptに

end tell

end repeat

end tell

end tell

DLはこちらからどうぞ。

https://box.yahoo.co.jp/guest/viewer?sid=box-l-qk3texvluwbqgcyxkherewskwe-1001&uniqid=c240e7c2-3533-461f-8b36-3445a321ccb1&viewtype=detail