GetValue ( YourContainerField ; 1 )
Will return the pixel dimensions of the image as text separated by the X character. (ie. 500 x 500 ). IF the image was inserted with the Insert Picture and "Store a reference" options specified.
If your images are embedded or externally stored, you can use a script to capture this info by setting up a global container field and using a script to export the file to the temporary folder and then insert it with the Insert picture/store a reference options specified in a script. Then set field with the above expression can extract the dimensions from the global container field and store them in a field or fields.
The XY coordinates of a container field will be fixed and visible on the Inspector's position tab while you are in layout mode unless you have set bottom or right auto-resize anchors. If that's the case, you might see if GetLayoutObjectAttribute can extract the browse mode position of the field.
Could you give me any tips on how would you write a GetLayoutObjectAttribute
My object is V4C1 and I want to get Position-Left from inspector
Many thanks for your help
If you have used the Name box in the Inspector to give the field an object name of V4C1, then (Simply copying from FIleMaker help here...)
GetLayoutObjectAttribute ( "VFC1" ; "left" )
will return the Left position attribute. I do not know if a change in position due to a window size change moving the object down or to the right will be reflected in the results returned by this function or not. You'd have to test that for yourself and see if it affects the results returned.
I have got "left" working fine
But I need "top" also ....... which is returning 290px when the inspector says 185px
Would you have any idea why this may be?
I just spent some time testing other objects "top" attributes. they are all returning 80px more than what the inspector is stating!!!!
How do you intend to use this data?
I think the difference is the portion of the FileMaker window above the top edge of the layout itself.
Yes the difference is in the top edge! just makes the calculations longer!
I use the xy from FM combined with Windows xy to geofence a container in which I add graphics to photographs using the mouse cursor regardless of where the container is on the screen.
Does that mean you are opening a new window to display that container field?