I have group B (layer 1) and group C (layer 2) inside group A (layer 0).
Help me with the command to find
L1, L2, L3, X1, Y1, Z1 (the length of the side and the origin of A)
X2, Y2, Z2 (center coordinate B)
X3, Y3, Z3 (square origin C).
It is not my responsibility to do your work for you. We encourage new coders to at least make an attempt to solve their own coding challenges, and ask specific coding questions here in the forum, so that they can succeed themselves. It is the best way to learn.
I gave you a partial answer above for the coordinates of the “Group A” origin.
Group B’s bounds center will be within the entities of Group A and the coordinates will be relative to Group A’s transformation. If the center of the circle is also the origin of Group B, then this will be simpler as it will also be the origin of B’s transformation.
I showed above how to find a group by instance name. If you wish to find a group by layer name, then …
As Dan tried to explain, there is no such thing as a “simple command” to get the values. You need to write a complex (but not necessarily complicated) methods, at least a snippet of code or your own plugin (extension).
Even experienced programmers take the time to figure out:
what is the specific task
what options need to be considered
what prerequisites must be met for the existing geometry
whether it is possible to meet these conditions
it is possible to consider these conditions at all in the Ruby API
and so on…
Dan gave a general guide and some examples on how to get started with the task, but is not expected to be “hippie-ready.”
Unfortunately, you need to delve a little deeper into the “mysteries” of Ruby, or ask a programmer to do it for you (most probably for money).
Of course, if you ask specific coding questions here in the forum, we are here to share our ideas and advise.