Methode · PartDoc
SetCosmosWorksMaterial-Methode (PartDoc)
Weist einem Teil ein Material für die Simulation zu.
Syntax
Sub SetCosmosWorksMaterial( _
ByVal ConfigName As String, _
ByVal Type As Long _
)swPart.SetCosmosWorksMaterial "Standard", swCosmosWorksMatSteelParameter
ConfigNameStringByVal- Name der Konfiguration.
TypeLongByVal- Das Material, ein Wert aus
swCosmosWorksMat, etwaswCosmosWorksMatSteel(5) oderswCosmosWorksMatAluminum(2).
Beispiel
' swPart ist das PartDoc, swModel dasselbe Dokument als ModelDoc2.
swPart.SetCosmosWorksMaterial swModel.ConfigurationManager.ActiveConfiguration.Name, swCosmosWorksMatSteelBemerkungen
Die Hilfe nennt einen Rückgabewert, obwohl der Befehl ein Sub ist. Der Name deutet auf die Simulation (früher COSMOSWorks).
Siehe auch
Verfügbarkeit
SOLIDWORKS 2009
Englisches Original: IPartDoc::SetCosmosWorksMaterial in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.