Retrieving the coordinates of a Selection Object with Visual Basic

US
Posted By
uemit_s
Aug 6, 2004
Views
718
Replies
2
Status
Closed
Is there any way to retrieve the coordinates and dimensions respectively of a selection in Photoshop with Visual Basic? I wasn’t able to find the solution in the documentations of the Photoshop 7.0 Scripting plug in. The documentation describes the functions and properties of the Selection Object however I couldn’t find any relevant properties concerning dimensions and coordinates respectively.
The weird thing is that it is possible to define/create a Selection by providing the coordinates of the region which should be selected.

Thanks in advance

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

M
Mick
Aug 8, 2004
You can’t get the coordinates/dimensions of a selection directly. In PSCS you can create an adjustment layer from the selection and get the bounds of the layer but layers in 7 do not have a bounds property. This seems to be a serious flaw in the object model in 7 and I don’t know of a workaround.

"?mit S" wrote in message
Is there any way to retrieve the coordinates and dimensions respectively of a selection in Photoshop with Visual Basic? I wasn’t able to find the solution in the documentations of the Photoshop 7.0 Scripting plug in. The documentation describes the functions and properties of the Selection Object however I couldn’t find any relevant properties concerning dimensions and coordinates respectively.
The weird thing is that it is possible to define/create a Selection by providing the coordinates of the region which should be selected.
Thanks in advance
US
uemit_s
Aug 9, 2004
Hi Mick

Thanks for the answer. You are right this is a serious flaw in the object model.

"Mick" …
You can’t get the coordinates/dimensions of a selection directly. In PSCS you can create an adjustment layer from the selection and get the bounds of the layer but layers in 7 do not have a bounds property. This seems to be a serious flaw in the object model in 7 and I don’t know of a workaround.

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections