Methode · Component2
RemoveMaterialProperty2-Methode (Component2)
Entfernt die eigene Darstellung (Farbe) einer Komponente in bestimmten Konfigurationen.
Syntax
Function RemoveMaterialProperty2( _
ByVal Config_opt As Long, _
ByVal Config_names As Variant _
) As BooleanbErfolg = swComp.RemoveMaterialProperty2(swThisConfiguration, Empty)Parameter
Config_optLongByVal- Für welche Konfigurationen, ein Wert aus
swInConfigurationOpts_e:swThisConfiguration(1),swAllConfiguration(2) oderswSpecifyConfiguration(3). Config_namesVariantByVal- Nur bei
swSpecifyConfiguration: Array mit den Namen der Konfigurationen, sonstEmpty.
Rückgabewert
True, wenn entfernt, sonst False.
Beispiel
' swComp ist eine Component2, etwa aus AssemblyDoc.GetComponents.
If swComp.HasMaterialPropertyValues Then swComp.RemoveMaterialProperty2 swThisConfiguration, EmptyBemerkungen
Danach zeigt die Komponente wieder die Farbe ihres Modells.
Siehe auch
Verfügbarkeit
SOLIDWORKS 2004
Englisches Original: IComponent2::RemoveMaterialProperty2 in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.