SolidWorksMakroprogrammierung

Eigenschaft · SimulationMotorFeatureData

MotorType-Eigenschaft (SimulationMotorFeatureData)

Liefert, ob der Motor ein Linearmotor oder ein Drehmotor ist.

Syntax

Property MotorType As Long
nArt = swMotor.MotorType

Wert

Ein Wert aus swSimulationMotorType_e.

Die Eigenschaft ist nur lesbar.

Beispiel

' swMotor ist die Definition eines Motors (SimulationMotorFeatureData), etwa aus Feature.GetDefinition.
If swMotor.MotorType = swSimulationRotaryMotor Then
    Debug.Print "Drehmotor"
Else
    Debug.Print "Linearmotor"
End If

Bemerkungen

Die Art legst du beim Anlegen fest: mit swFmAEMLinearMotor oder swFmAEMRotationalMotor aus swFeatureNameID_e in MotionStudy.CreateDefinition. Das Hilfebeispiel „Create Linear Motor Feature“ gibt den Wert nach dem Anlegen der Definition aus.

Siehe auch

Verfügbarkeit

SOLIDWORKS 2006

Englisches Original: ISimulationMotorFeatureData::MotorType in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)

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