SolidWorksMakroprogrammierung

Methode · Feature

RemoveMaterialProperty2-Methode (Feature)

Entfernt die eigene Farbe und Darstellung eines Features in einer oder mehreren Konfigurationen.

Syntax

Function RemoveMaterialProperty2( _
   ByVal Config_opt As Long, _
   ByVal Config_names As Variant _
) As Boolean
bErfolg = swFeat.RemoveMaterialProperty2(swAllConfiguration, Empty)

Parameter

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

Rückgabewert

True, wenn entfernt, sonst False.

Beispiel

' swFeat ist ein Feature, etwa aus SelectionMgr.GetSelectedObject6 oder ModelDoc2.FirstFeature.
If swFeat.HasMaterialPropertyValues Then swFeat.RemoveMaterialProperty2 swAllConfiguration, Empty

Siehe auch

Verfügbarkeit

SOLIDWORKS 2004

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

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