Methode · ExplodeStep
GetRotationAxis-Methode (ExplodeStep)
Liefert die Drehachse eines normalen Explosionsschritts: den Ring des Manipulators und das Achselement.
Syntax
Function GetRotationAxis( _
ByRef RotAxisIndex As Long _
) As ObjectSet swAchse = swSchritt.GetRotationAxis(nRing)Parameter
RotAxisIndexLongByRef · Rückgabe- Gibt den Ring des Manipulators zurück, ein Wert aus
swRotationAxisIndex_e. Übergib eine Variable vom TypLong.
Rückgabewert
Das Element der Drehachse. Nothing, wenn beim Anlegen des Schritts keins ausgewählt war.
Beispiel
' swSchritt ist ein normaler Explosionsschritt einer Baugruppe (ExplodeStep), etwa aus Configuration.GetExplodeStep.
Dim swAchse As Object
Dim nRing As Long
If swSchritt.ExplodeStepType = swAssemblyExplodeStepType_Translate Then
Set swAchse = swSchritt.GetRotationAxis(nRing)
Select Case nRing
Case swRotationAxisIndex_XYRing: Debug.Print "XY-Ring"
Case swRotationAxisIndex_YZRing: Debug.Print "YZ-Ring"
Case swRotationAxisIndex_ZXRing: Debug.Print "ZX-Ring"
End Select
If swAchse Is Nothing Then Debug.Print "Ohne Achselement"
End IfBemerkungen
Die Methode gilt für normale Schritte und geht nicht bei Schritten einer Unterbaugruppe. Welche Elemente als Drehachse vorkommen, sagt die Hilfe nicht. Beim Anlegen mit Configuration.AddExplodeStep2 wählst du sie mit Markierung 32 aus. Ändern kannst du sie mit ExplodeStep.SetRotationAxis.
Siehe auch
Verfügbarkeit
SOLIDWORKS 2018
Englisches Original: IExplodeStep::GetRotationAxis in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.