SolidWorksMakroprogrammierung

Methode · SimulationMotorFeatureData

OscillatingMotor-Methode (SimulationMotorFeatureData)

Stellt den Motor auf eine Schwingung mit Ausschlag und Frequenz.

Syntax

Sub OscillatingMotor( _
   ByVal Displacement As Double, _
   ByVal Frequency As Double _
)
swMotor.OscillatingMotor 30, 0.5

Parameter

DisplacementDoubleByVal
Der Ausschlag, nach Angabe der Hilfe in Grad.
FrequencyDoubleByVal
Die Frequenz in Hz.

Beispiel

' swModel ist die Baugruppe (ModelDoc2), swFeat ein Drehmotor-Feature (Feature).
Dim swMotor As SldWorks.SimulationMotorFeatureData
Set swMotor = swFeat.GetDefinition
swMotor.OscillatingMotor 30, 0.5
If False = swFeat.ModifyDefinition(swMotor, swModel, Nothing) Then Debug.Print "Ändern fehlgeschlagen"

Bemerkungen

Ob der Ausschlag von der Mittellage oder von Spitze zu Spitze gemessen wird und welche Einheit bei einem Linearmotor gilt, sagt die Hilfe nicht. Vermutlich stellt die Methode SimulationMotorFeatureData.MotionType auf swSimulationMotorMotion_Harmonic.

Die Methode stellt SimulationMotorFeatureData.MotionType auf swSimulationMotorMotion_Harmonic.

Siehe auch

Verfügbarkeit

SOLIDWORKS 2009

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

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