SolidWorksMakroprogrammierung

Enumeration · SwConst

swSimulationMotorType_e-Enumeration

Art eines Motors in einer Bewegungsstudie: Linearmotor oder Drehmotor. Geliefert von SimulationMotorFeatureData.MotorType.

Bibliothek SwConst · 2 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swSimulationLinearMotor

Syntax

Enum swSimulationMotorType_e
    swSimulationLinearMotor = 0
    swSimulationRotaryMotor = 1
End Enum

Werte

KonstanteWertBedeutung
swSimulationLinearMotor0Linearmotor. Er bewegt geradlinig.
swSimulationRotaryMotor1Drehmotor. Er dreht.

Beispiel

' swFeat ist ein Motor-Feature einer Bewegungsstudie, etwa aus SelectionMgr.GetSelectedObject6.
Dim swMotor As SimulationMotorFeatureData
Set swMotor = swFeat.GetDefinition
Select Case swMotor.MotorType
    Case swSimulationLinearMotor
        Debug.Print "Linearmotor"
    Case swSimulationRotaryMotor
        Debug.Print "Drehmotor"
End Select

Bemerkungen

SimulationMotorFeatureData.MotorType kannst du nur lesen. Die Art legst du beim Erstellen fest: mit swFmAEMLinearMotor oder swFmAEMRotationalMotor aus swFeatureNameID_e in MotionStudy.CreateDefinition.

Wie sich der Motor bewegt, steht in swSimulationMotorMotionType_e.

Verwendet von

Siehe auch

Englisches Original: swSimulationMotorType_e in der SOLIDWORKS API-Hilfe ↗

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