Hi everyone,
I just want the rotate a client graphic object. From its center and 90 degrees. But there is not any change in view.
Here is my code
double PI = 3.14159265358979;
AssemblyDocument asmDoc = (AssemblyDocument)invApp.ActiveDocument;
AssemblyComponentDefinition asmCompDef = asmDoc.ComponentDefinition;
TransientGeometry transientGeometry = invApp.TransientGeometry;
ClientGraphics partPreview = asmCompDef.ClientGraphicsCollection["PartPreview"];
GraphicsNode graphicsNode = partPreview.ItemById[partPreview.Count];
Inventor.Camera cam = invApp.ActiveView.Camera;
Matrix matrix = transientGeometry.CreateMatrix();
Vector vector = cam.UpVector.AsVector();
matrix.SetToRotation(PI / 2, vector, placementPoint);
graphicsNode.Transformation.TransformBy(matrix);
invApp.ActiveView.Update();
Is any wrong with my code?
Thanks.
If my answer is solved your problem, please mark it as Solution
Freundliche Grüße / Kind Regards