Create Label in LayOut with Ruby

Hi, i’m trying to use Layout API for the first time.
I try to add a circle around label. but I don’t understand how label position works.
Bounds of label aren’t clear for me.

I use the 2 methods to set label position to workaround bounds but unsuccessfully

On more strange things is when I open the Layout file, and clic on the label, the position change.

If you can explain me, whats is bounds of the label and how work ( any tutorial ?)

Please find attached my current code
layout.rb (3,9 Ko)

zertzert émail .layout (3,8 Mo)

Last info : i’m using sketchup 2020.1 on Mac Os Catalina 10.15.4

Hi all,

I answer to myself maybe if some-else is interest by creating lable with Layout API.
Its really hard to explain it even in french, I produce a layout with the code and the result

In resume: the bound of the label is offset depending of the connection_type.

I enclosed the layout and the pdf file.
test.layout (74,0 Ko) test.pdf (118,4 Ko)