Enumeration · SwConst
swExplodeDirectionIndex_e-Enumeration
In welche Achsrichtung des Manipulators ein Explosionsschritt die Komponenten oder Körper verschiebt: X, Y oder Z.
Syntax
Enum swExplodeDirectionIndex_e
swExplodeDirectionIndex_Unknown = -1
swExplodeDirectionIndex_XAxis = 0
swExplodeDirectionIndex_YAxis = 1
swExplodeDirectionIndex_ZAxis = 2
End EnumWerte
| Konstante | Wert | Bedeutung |
|---|---|---|
swExplodeDirectionIndex_Unknown | -1 | Nur für ExplodeStep.SetExplodeDirection: Die bisher eingestellte Richtung bleibt. |
swExplodeDirectionIndex_XAxis | 0 | Verschieben entlang der X-Achse des Manipulators. |
swExplodeDirectionIndex_YAxis | 1 | Verschieben entlang der Y-Achse des Manipulators. |
swExplodeDirectionIndex_ZAxis | 2 | Verschieben entlang der Z-Achse des Manipulators. |
Beispiel
' swConfig ist die aktive Konfiguration (Configuration) einer Baugruppe mit Explosionsansicht.
Dim swSchritt As SldWorks.ExplodeStep
Dim swRichtung As Object
Dim nAchse As Long
Set swSchritt = swConfig.GetExplodeStep(0)
Set swRichtung = swSchritt.GetExplodeDirection(nAchse)
Select Case nAchse
Case swExplodeDirectionIndex_XAxis: Debug.Print "X-Achse"
Case swExplodeDirectionIndex_YAxis: Debug.Print "Y-Achse"
Case swExplodeDirectionIndex_ZAxis: Debug.Print "Z-Achse"
End Select
If Not swRichtung Is Nothing Then Debug.Print "Mit ausgewähltem Richtungselement"Bemerkungen
Die Richtung übergibst du an Configuration.AddExplodeStep2 (Baugruppe) oder Configuration.AddPartExplodeStep (Mehrkörperteil) im Parameter ExplDirIndex. ExplodeStep.GetExplodeDirection und PartExplodeStep.GetExplodeDirection liefern sie zurück, ExplodeStep.SetExplodeDirection und PartExplodeStep.SetExplodeDirection ändern sie. Die ExplodeStep-Befehle gelten nur für normale Explosionsschritte, nicht für Schritte von Unterbaugruppen.
Zusätzlich zur Achse kann ein Schritt ein Richtungselement haben: eine zylindrische oder kegelige Fläche, eine gerade Kante oder eine Achse. Vor dem Anlegen wählst du es mit Markierung 2 aus. Du kannst Achse, Element, beides oder keins angeben. Fehlt beides, gilt die Z-Achse. Übergibst du beim Ändern ein gültiges Element, aber einen ungültigen Index, setzt SOLIDWORKS den Index auf die Z-Achse zurück. Ob swExplodeDirectionIndex_Unknown dabei als ungültig zählt, sagt die Hilfe nicht.
Die Hilfe beschreibt die drei Achsen nur mit ihrem Namen. Für den Drehring eines Explosionsschritts gibt es entsprechend swRotationAxisIndex_e.
Verwendet von
Siehe auch
Englisches Original: swExplodeDirectionIndex_e in der SOLIDWORKS API-Hilfe ↗
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.