Message 1 of 8

Not applicable
02-13-2020
07:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've been using iLogic to create a Shrinkwrap of an assembly. The problem I'm having is it resets the current view. I need to rotate the Part (Which is a new Part Document) 90° to the right.
I found and have been trying a bit with this:
Const PI = 3.14159265358979 Dim d As Inventor.PartDocument d = ThisApplication.ActiveDocument Dim a As WorkAxis a = d.ComponentDefinition.WorkAxes(1) Dim o As Inventor.ComponentDefinition o = d.ComponentDefinition Dim t As TransientGeometry t = ThisApplication.TransientGeometry Dim l As Line l = a.Line Dim mRot As Matrix mRot = t.CreateMatrix() ' PI / 2 => 90 deg mRot.SetToRotation(PI / 2, l.Direction.AsVector(), l.RootPoint) Dim m As Matrix m = o.Transformation MessageBox.Show("Message", "Title") m.PreMultiplyBy(mRot) o.Transformation = m
Solved! Go to Solution.