position and orientation of the current work plane?

position and orientation of the current work plane?

Anonymous
Not applicable
815 Views
5 Replies
Message 1 of 6

position and orientation of the current work plane?

Anonymous
Not applicable
Does anybody knows how I can get the position and orientation of the current work plane?I want to rotate the current work plane about an axis, which one is depended on the current position of the work plane. Thanks!
0 Likes
816 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
Workplane.Plane.GetPlaneData()
0 Likes
Message 3 of 6

Anonymous
Not applicable
Can you explain that more?? How can I declare the arguments as double and as array of double, and not as point and as vectors?Can you give me an example?
0 Likes
Message 4 of 6

Anonymous
Not applicable
You can't directly reposition a typical work plane in Inventor. This is
because they're position is parameterically defined and moving it to any
arbitrary position would be breaking that definition.

There is an exception to this. Through the API you can create something
called a Fixed Work Plane. This is a work plane that is positioned at a
fixed location in space without any parametric relationships. Here's some
sample code that illustrates using one of these. This sample converts an
existing work plane to one of these types. This will cause the previous
parametric definition to be lost. You can also directly create a fixed
workplane using the WorkPlanes.AddFixed method.

Public Sub MoveWorkPlane()
Dim oPartDef As PartComponentDefinition
Set oPartDef = ThisApplication.ActiveDocument.ComponentDefinition

Dim oWP As WorkPlane
Set oWP = oPartDef.WorkPlanes.Item("Work Plane2")

Dim oTG As TransientGeometry
Set oTG = ThisApplication.TransientGeometry

' Change the defininition to a fixed type of workplane.
Call oWP.SetFixed(oTG.CreatePoint(0, 0, 0), oTG.CreateUnitVector(1, 0,
0), oTG.CreateUnitVector(0, 1, 0))

' Reposition the work plane. You could also call the SetFixed method
again
' to change the position.
Dim oDef As FixedWorkPlaneDef
Set oDef = oWP.Definition
Call oDef.PutData(oTG.CreatePoint(0, 0, 0), oTG.CreateUnitVector(1, 1,
0), oTG.CreateUnitVector(-1, 1, 0))
End Sub
--
Brian Ekins
Autodesk Inventor API


wrote in message news:5518592@discussion.autodesk.com...
Does anybody knows how I can get the position and orientation of the current
work plane?I want to rotate the current work plane about an axis, which one
is depended on the current position of the work plane. Thanks!
0 Likes
Message 5 of 6

Anonymous
Not applicable
Thank you very much for your help but my problem is that I don't Know the position of the current work plane, or better I want to make a programme that will make 2 features and the work planes that the features will be made on are perpendicular to each other. So I want to know if there is a way by API to flind the position of the current work plane
0 Likes
Message 6 of 6

Anonymous
Not applicable
venia,
To get the position of the specific work plane (e.g., oWP), you should call its method oWP.GetPosition. It returns the origin of the work plane, and both unit vectors X and Y of the work plane oWP.

These three parameters exactly defines the work plane.
0 Likes