Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to rotate the end shaft in the drawing 90° along the X axis. this is my code. instead of rotating the shaft is moved to the opposite end. What am I missing?
AssemblyDocument oDoc;
AssemblyComponentDefinition oCompDef;
ComponentOccurrence oCC;
Matrix oTransform;
oDoc = (AssemblyDocument)oInventorApp.ActiveDocument;
oCompDef = oDoc.ComponentDefinition;
int i = oCompDef.Occurrences.Count;
oCC = oCompDef.Occurrences[i];
oCC.Grounded = false;
oTransform = oCC.Transformation;
oTransform.SetToRotation(90.0 * DtoR, oITransGeo.CreateVector(1, 0, 0), oITransGeo.CreatePoint(1024.7, 0, 0));
oCC.Transformation = oTransform;
oCC.Grounded = true;
Solved! Go to Solution.