The Measure Tool in SOLIDWORKS has a serious limitation when coordinate systems are selected: it does not report angles!!!
Can the angle measurements be done by API?
The first selected COORDINATE SYSTEm should be the reference frame.
It sure can. A reference coordinate system is just a transformation of the global coordinate system.
Can you explain what sort of number you expect from this measurement?
Looking at your first image, it's apparent that the second Csys is simply rotated by about 135 degrees or so about the Y axis. But what if it was then rotated about the Z or X as well? What angle would you be expecting?
In your second image you've selected an axis and a coordinate system. How would you define the angle between an axis and a coordinate system?
Just to clarify my request for clarification.... Please check out the attached assembly of two cubes, each with a coordinate system attached in the corner. This is so that we can select the edges of the cube to measure.
First cube is fixed, and the second one is mated to it by one corner. Then, the x-axis edge of the second cube is mated parallel to the first cube's interior diagonal. So the direction of the X axis of Csys2 is fully defined. It forms a 54.74 degree angle with all three of the axes of Csys1.
However, Cube2 can still be rotated freely about its X-axis edge, so its Y and Z axes still have 360 degrees of rotational freedom.
So, given this set of coordinate systems, how would you like their angles presented? Just the angle between X1-X2, Y1-Y2, and Z1-Z2?
Any of this can be calculated through the API, of course. It's just a question of how you want it presented. However, I don't think the angles are likely to make sense except in special cases (like what you posted) where only a single rotation has taken place rather than the general case of an arbitrary 3D rotation.
Yup this can be done with a good understanding of math transform.
Thank you all for the feedback. Will provide details once I understand better the requirements.
Retrieving data ...