SolidWorksMakroprogrammierung

Enumeration · SwConst

swSimulationMotorMotionType_e-Enumeration

Wie sich ein Motor in einer Bewegungsstudie über die Zeit bewegt, zum Beispiel konstant oder harmonisch. Für SimulationMotorFeatureData.MotionType.

Bibliothek SwConst · 5 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swSimulationMotorMotion_Constant

Syntax

Enum swSimulationMotorMotionType_e
    swSimulationMotorMotion_Constant = 0
    swSimulationMotorMotion_Step     = 1
    swSimulationMotorMotion_Harmonic = 2
    swSimulationMotorMotion_Function = 3
    swSimulationMotorMotion_Spline   = 4
End Enum

Werte

KonstanteWertBedeutung
swSimulationMotorMotion_Constant0Konstante Bewegung.
swSimulationMotorMotion_Step1Sprungfunktion: Die Bewegung geht von einem Wert auf einen anderen über.
swSimulationMotorMotion_Harmonic2Harmonische Bewegung.
swSimulationMotorMotion_Function3Ausdruck. Den Ausdruck liest oder setzt du mit Expression.
swSimulationMotorMotion_Spline4Spline durch Datenpunkte, zum Beispiel geladen mit LoadSplineData.

Beispiel

' swFeat ist ein Motor-Feature einer Bewegungsstudie, etwa aus SelectionMgr.GetSelectedObject6.
Dim swMotor As SimulationMotorFeatureData
Set swMotor = swFeat.GetDefinition
Select Case swMotor.MotionType
    Case swSimulationMotorMotion_Constant
        Debug.Print "Konstant"
    Case swSimulationMotorMotion_Function
        Debug.Print "Ausdruck: " & swMotor.Expression
    Case Else
        Debug.Print "Anderer Verlauf"
End Select

Bemerkungen

SimulationMotorFeatureData.MotionType kannst du lesen und setzen. Die Hilfe beschreibt die Werte nur mit ihrem Namen.

Kräfte haben mit swSimulationForceFunctionType_e dieselbe Einteilung. Bei Datenpunkten gibst du mit swSimulationMotorDriveType_e an, welche Größe die Punkte beschreiben.

Verwendet von

Siehe auch

Englisches Original: swSimulationMotorMotionType_e in der SOLIDWORKS API-Hilfe ↗

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