Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

YZ plane default orientation...What gives?

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
timdown73
4628 Views, 22 Replies

YZ plane default orientation...What gives?

I know this has been discussed in other threads but...Why is the YZ origin plane oriented this way by default?  Having the plane oriented this way results in horizontal sketch geometry being vertical in the "right" (view cube) view. That's very frustrating!  I thought this was going to change in 15 but it looks like they only made changes to the "look at" command which I do not use because it further complicates this issue.  Thoughts? Solutions?

 

Capture.JPG

-Tim U.
Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz 2.30 GHz>Memory: 32.0 GB Ram
Op Sys: Windows 10 professional
22 REPLIES 22
Message 21 of 23
Anonymous
in reply to: timdown73

Sorry,

by default Inventor calculate it using its algorithm (depend what surface you pick and from witch side)

orientation in space can be tricky - then you decide your own "Horizontal"

uu

Message 22 of 23
barath.zoltan
in reply to: timdown73

Public Sub SetBasePlaneAxes()
Dim app As Application
Set app = ThisApplication

' Aktuális dokumentum ellenőrzése
If app.ActiveDocument.DocumentType <> kPartDocumentObject Then
MsgBox "Ez a kód csak alkatrész dokumentumokban futtatható.", vbCritical
Exit Sub
End If

Dim partDoc As PartDocument
Set partDoc = app.ActiveDocument

Dim compDef As PartComponentDefinition
Set compDef = partDoc.ComponentDefinition

Dim oWorkplane As WorkPlane

Dim def As FixedWorkPlaneDef

Dim tg As TransientGeometry
Set tg = app.TransientGeometry
Dim oPoint As Point
Set oPoint = tg.CreatePoint(0, 0, 0)

Dim XVector As UnitVector
Dim YVector As UnitVector


'*******************************************************
Set oWorkplane = compDef.WorkPlanes.Item(1)
Set def = oWorkplane.Definition

MsgBox oWorkplane.Name & " sík tengelyei beállítva."

Set XVector = CreateVector(0, 0, -1)
Set YVector = CreateVector(0, 1, 0)

Call def.PutData(oPoint, XVector, YVector)
'*******************************************************
Set oWorkplane = compDef.WorkPlanes.Item(2)
Set def = oWorkplane.Definition

MsgBox oWorkplane.Name & " sík tengelyei beállítva."

Set XVector = CreateVector(1, 0, 0)
Set YVector = CreateVector(0, 0, -1)

Call def.PutData(oPoint, XVector, YVector)

'*******************************************************
Set oWorkplane = compDef.WorkPlanes.Item(3)
Set def = oWorkplane.Definition

MsgBox oWorkplane.Name & " sík tengelyei beállítva."

Set XVector = CreateVector(1, 0, 0)
Set YVector = CreateVector(0, 1, 0)

Call def.PutData(oPoint, XVector, YVector)

MsgBox "Sík koordináták átállítva"

End Sub
Private Function CreateVector(x As Double, y As Double, z As Double) As UnitVector
Dim app As Application
Set app = ThisApplication

Dim vector As UnitVector
Set vector = app.TransientGeometry.CreateUnitVector(x, y, z)

Set CreateVector = vector
'MsgBox "Vektor létrehozva"
End Function

Message 23 of 23
barath.zoltan
in reply to: timdown73

 

Public Sub SetBasePlaneAxes()
Dim app As Application
Set app = ThisApplication

' Aktuális dokumentum ellenőrzése
If app.ActiveDocument.DocumentType <> kPartDocumentObject Then
MsgBox "Ez a kód csak alkatrész dokumentumokban futtatható.", vbCritical
Exit Sub
End If

Dim partDoc As PartDocument
Set partDoc = app.ActiveDocument

Dim compDef As PartComponentDefinition
Set compDef = partDoc.ComponentDefinition

Dim oWorkplane As WorkPlane

Dim def As FixedWorkPlaneDef

Dim tg As TransientGeometry
Set tg = app.TransientGeometry
Dim oPoint As Point
Set oPoint = tg.CreatePoint(0, 0, 0)

Dim XVector As UnitVector
Dim YVector As UnitVector


'*******************************************************
Set oWorkplane = compDef.WorkPlanes.Item(1)
Set def = oWorkplane.Definition

MsgBox oWorkplane.Name & " sík tengelyei beállítva."

Set XVector = CreateVector(0, 0, -1)
Set YVector = CreateVector(0, 1, 0)

Call def.PutData(oPoint, XVector, YVector)
'*******************************************************
Set oWorkplane = compDef.WorkPlanes.Item(2)
Set def = oWorkplane.Definition

MsgBox oWorkplane.Name & " sík tengelyei beállítva."

Set XVector = CreateVector(1, 0, 0)
Set YVector = CreateVector(0, 0, -1)

Call def.PutData(oPoint, XVector, YVector)

'*******************************************************
Set oWorkplane = compDef.WorkPlanes.Item(3)
Set def = oWorkplane.Definition

MsgBox oWorkplane.Name & " sík tengelyei beállítva."

Set XVector = CreateVector(1, 0, 0)
Set YVector = CreateVector(0, 1, 0)

Call def.PutData(oPoint, XVector, YVector)

MsgBox "Sík koordináták átállítva"

End Sub
Private Function CreateVector(x As Double, y As Double, z As Double) As UnitVector
Dim app As Application
Set app = ThisApplication

Dim vector As UnitVector
Set vector = app.TransientGeometry.CreateUnitVector(x, y, z)

Set CreateVector = vector
'MsgBox "Vektor létrehozva"
End Function

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report