SolidWorksMakroprogrammierung

Methode · Component2

SetCosmosWorksMaterial-Methode (Component2)

Weist einer Komponente ein Material für die Simulation zu.

Syntax

Function SetCosmosWorksMaterial( _
   ByVal ConfigName As String, _
   ByVal Type As Long _
) As Boolean
bErfolg = swComp.SetCosmosWorksMaterial("Standard", swCosmosWorksMatSteel)

Parameter

ConfigNameStringByVal
Name der Konfiguration.
TypeLongByVal
Das Material, ein Wert aus swCosmosWorksMat: swCosmosWorksMatSteel (5) Stahl, swCosmosWorksMatAluminum (2) Aluminium, swCosmosWorksMatNylon (3), swCosmosWorksMatRubber (4) Gummi, swCosmosWorksMatAcrylic (1), swCosmosWorksMatNone (0) keins.

Rückgabewert

True, wenn zugewiesen, sonst False.

Beispiel

' swComp ist eine Component2, etwa aus AssemblyDoc.GetComponents.
swComp.SetCosmosWorksMaterial swComp.ReferencedConfiguration, swCosmosWorksMatSteel

Bemerkungen

Die Hilfe sagt nicht, für welche Analyse das Material gilt. Der Name deutet auf die Simulation (früher COSMOSWorks).

Siehe auch

Verfügbarkeit

SOLIDWORKS 2009

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

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