SolidWorksMakroprogrammierung

Methode · Body2

RemoveMaterialProperty-Methode (Body2)

Entfernt die eigene Darstellung (Farbe) eines Körpers in bestimmten Konfigurationen.

Syntax

Function RemoveMaterialProperty( _
   ByVal Config_opt As Long, _
   ByVal Config_names As Variant _
) As Boolean
bErfolg = swBody.RemoveMaterialProperty(swThisConfiguration, Empty)

Parameter

Config_optLongByVal
Für welche Konfigurationen, ein Wert aus swInConfigurationOpts_e: swThisConfiguration (1), swAllConfiguration (2) oder swSpecifyConfiguration (3).
Config_namesVariantByVal
Nur bei swSpecifyConfiguration: Array mit den Namen der Konfigurationen, sonst Empty.

Rückgabewert

Die Hilfe beschreibt den Wert nicht, vermutlich True bei Erfolg.

Beispiel

' swBody ist ein Körper (Body2), etwa aus PartDoc.GetBodies2.
If swBody.HasMaterialPropertyValues Then swBody.RemoveMaterialProperty swThisConfiguration, Empty

Siehe auch

Verfügbarkeit

SOLIDWORKS 2008

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

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