0
エクスプローラー
,
/t5/illustrator%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A9%E3%83%A0-discussions/get-layer-name/td-p/14554367
Apr 14, 2024
Apr 14, 2024
リンクをクリップボードにコピー
コピー完了
Hello, how should I write a script to get the name of 'object_1'?
app.activeDocument.activeLayer.layers[0].layer(2).name
I couldn't retrieve them with this syntax.
キーワード
Win
,
スクリプティング
コミュニティガイドライン
他のユーザーへの思いやりを持ち、敬意を払いましょう。コンテンツの出典を明記し、投稿する前に内容が重複していないか検索してください。
さらに詳しく
1 件の正解
Community Expert
,
Apr 14, 2024
Apr 14, 2024
please check the object hierarchy again.
mySubLayer has 3 objects and they are pageItems, not subLayers.
Currently, "object_1" is selected and the active layer is "mySubLayer".
Therefore, to access the "name" property of "object_1" from this state, do the following
//activeLayer as "mySubLayer" not "myLayer"
alert(app.activeDocument.activeLayer.pageItems[0].name)
Community Expert
,
最新
/t5/illustrator%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A9%E3%83%A0-discussions/get-layer-name/m-p/14554928#M35775
Apr 14, 2024
Apr 14, 2024
リンクをクリップボードにコピー
コピー完了
please check the object hierarchy again.
mySubLayer has 3 objects and they are pageItems, not subLayers.
Currently, "object_1" is selected and the active layer is "mySubLayer".
Therefore, to access the "name" property of "object_1" from this state, do the following
//activeLayer as "mySubLayer" not "myLayer"
alert(app.activeDocument.activeLayer.pageItems[0].name)
コミュニティガイドライン
他のユーザーへの思いやりを持ち、敬意を払いましょう。コンテンツの出典を明記し、投稿する前に内容が重複していないか検索してください。
さらに詳しく

