SolidWorksMakroprogrammierung

Methode · Face2

RemoveMaterialProperty2-Methode (Face2)

Entfernt die eigene Darstellung (Farbe) einer Fläche in bestimmten Konfigurationen.

Syntax

Function RemoveMaterialProperty2( _
   ByVal Config_opt As Long, _
   ByVal Config_names As Variant _
) As Boolean
bErfolg = swFace.RemoveMaterialProperty2(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

True, wenn entfernt, sonst False.

Beispiel

' swFace ist eine Fläche (Face2), etwa aus Body2.GetFaces oder der Auswahl.
If swFace.HasMaterialPropertyValues Then swFace.RemoveMaterialProperty2 swThisConfiguration, Empty

Siehe auch

Verfügbarkeit

SOLIDWORKS 2004

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

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