We have some important news to share: the Pixelmator Team plans to join Apple. If you need product support please contact us here.

Learn more

AppleScript: duplicate [layer] ignores the "with properties" parameter

Is something not working like it should? Let us know.

The Pixelmator Community has been archived and cannot accept new posts or comments.

User avatar

2024-07-08 21:10:53

Apple M2, Sonoma 14.5
Version 3.6.4 (Archipelago)

In this case, duplicating a layer ignores the "with properties" argument. The example below duplicates a layer and at the same time gives it a new name and lock state. Those specified properties are ignored.
tell application "Pixelmator Pro"
	set testDoc to make new document with properties {name:"Naming Test"}
	tell testDoc
		set imageLayer to make new image layer with properties {name:"Original Layer", locked:true}		
		duplicate imageLayer with properties {name:"Duplicate", locked:false}
	end tell
end tell