thank you for the link.
And any other suggestion to the question above? thank you ~
I suggest trying something like this :
MathUtility swMathUtil = swApp.GetMathUtility MathTransform swGBUcsTransform = swApp.ActiveDoc.Extension.GetCoordinateSystemTransformByName("MyUCSName")
Thank you Michael,
I tried this:
But it can only get the matrix transform of the coordsys in the root design tree. When the coordsys belong to a sub-assembly, the function return null.
And I also tried this:
CoordinateSystemFeatureData coord = (CoordinateSystemFeatureData)swFeat.GetDefinition(); MathTransform swTransform = coord.Transform;
The matrix transform return by this function is always successful, but the value is not global in the current assembly but local to the sub-assembly.
Then I tried to traverse the design tree from the coord to the root (the coord is selected by mouse clicking at first) and multiply all the transform of sub-assembly, but I even cannot get the parent of the coordsys feature...