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

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

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.

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections