SolidWorksMakroprogrammierung

Enumeration · SwConst

swRotationAxisIndex_e-Enumeration

Welcher Drehring des Manipulators einen Explosionsschritt dreht: XY-, YZ- oder ZX-Ring.

Bibliothek SwConst · 4 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swRotationAxisIndex_Unknown

Syntax

Enum swRotationAxisIndex_e
    swRotationAxisIndex_Unknown = -1
    swRotationAxisIndex_XYRing  = 0
    swRotationAxisIndex_YZRing  = 1
    swRotationAxisIndex_ZXRing  = 2
End Enum

Werte

KonstanteWertBedeutung
swRotationAxisIndex_Unknown-1Nur für ExplodeStep.SetRotationAxis: Der bisher eingestellte Ring bleibt.
swRotationAxisIndex_XYRing0Drehring in der XY-Ebene des Manipulators.
swRotationAxisIndex_YZRing1Drehring in der YZ-Ebene des Manipulators.
swRotationAxisIndex_ZXRing2Drehring in der ZX-Ebene des Manipulators.

Beispiel

' swConfig ist die aktive Konfiguration (Configuration) einer Baugruppe mit Explosionsansicht.
Dim swSchritt As SldWorks.ExplodeStep
Dim swAchse As Object
Dim nRing As Long
Set swSchritt = swConfig.GetExplodeStep(0)
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 Not swAchse Is Nothing Then Debug.Print "Mit ausgewählter Drehachse"

Bemerkungen

Den Ring übergibst du an Configuration.AddExplodeStep2 im Parameter RotAxisIndex oder an ExplodeStep.SetRotationAxis. ExplodeStep.GetRotationAxis liefert ihn zurück. Die beiden ExplodeStep-Befehle gelten nur für normale Explosionsschritte, nicht für Schritte von Unterbaugruppen.

Zusätzlich zum Ring kann ein Schritt eine Drehachse haben. Vor AddExplodeStep2 wählst du sie mit Markierung 32 aus, nur wirksam bei RotateAboutOrigin = False. Du kannst Ring, Drehachse, beides oder keins angeben. Fehlt beides, gilt der XY-Ring.

Die Hilfe beschreibt die drei Ringe nur mit ihrem Namen. Für die Richtung der Verschiebung gibt es entsprechend swExplodeDirectionIndex_e.

Verwendet von

Siehe auch

Englisches Original: swRotationAxisIndex_e in der SOLIDWORKS API-Hilfe ↗

Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.