Methode · Face2
GetMaterialPropertyValues2-Methode (Face2)
Liefert Farbe und Lichteigenschaften einer Fläche in bestimmten Konfigurationen.
Syntax
Function GetMaterialPropertyValues2( _
ByVal Config_opt As Long, _
ByVal Config_names As Variant _
) As VariantvWerte = swFace.GetMaterialPropertyValues2(swThisConfiguration, Nothing)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 Namen, sonstNothing.
Rückgabewert
Array mit neun Double-Werten, siehe Bemerkungen.
Beispiel
' swFace ist eine Fläche (Face2), etwa aus Body2.GetFaces oder der Auswahl.
Dim vWerte As Variant
If swFace.HasMaterialPropertyValues Then
vWerte = swFace.GetMaterialPropertyValues2(swThisConfiguration, Nothing)
Debug.Print "RGB: " & vWerte(0) * 255 & ", " & vWerte(1) * 255 & ", " & vWerte(2) * 255
End IfBemerkungen
Das Array hat neun Werte: Rot, Grün, Blau, Umgebung, Streuung, Glanz, Glanzgröße, Transparenz, Leuchten, jeweils von 0 bis 1.
Siehe auch
Verfügbarkeit
SOLIDWORKS 2004
Englisches Original: IFace2::GetMaterialPropertyValues2 in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.