SolidWorksMakroprogrammierung

Enumeration · SwConst

swConfigurationType_e-Enumeration

Die Art einer Konfiguration, etwa normal, SpeedPak, Defeature oder für Schweißkonstruktionen. Configuration.Type liefert diese Werte.

Bibliothek SwConst · 6 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swConfiguration_Standard

Syntax

Enum swConfigurationType_e
    swConfiguration_Standard   = 0
    swConfiguration_AsMachined = 1
    swConfiguration_AsWelded   = 2
    swConfiguration_SheetMetal = 3
    swConfiguration_SpeedPak   = 4
    swConfiguration_Defeature  = 5
End Enum

Werte

KonstanteWertBedeutung
swConfiguration_Standard0Normale Konfiguration ohne besondere Art.
swConfiguration_AsMachined1Dem Namen nach eine Konfiguration einer Schweißkonstruktion im bearbeiteten Zustand (As Machined).
swConfiguration_AsWelded2Dem Namen nach eine Konfiguration einer Schweißkonstruktion im geschweißten Zustand (As Welded).
swConfiguration_SheetMetal3Dem Namen nach eine Konfiguration für Blech.
swConfiguration_SpeedPak4SpeedPak-Konfiguration einer Baugruppe.
swConfiguration_Defeature5Vereinfachte Konfiguration aus dem Werkzeug Defeature.

Beispiel

' swModel ist das aktive Dokument (ModelDoc2).
Dim swConfig As SldWorks.Configuration
Dim vNamen As Variant, i As Long
vNamen = swModel.GetConfigurationNames
For i = 0 To UBound(vNamen)
    Set swConfig = swModel.GetConfigurationByName(vNamen(i))
    Select Case swConfig.Type
        Case swConfiguration_SpeedPak: Debug.Print vNamen(i) & ": SpeedPak"
        Case swConfiguration_Defeature: Debug.Print vNamen(i) & ": vereinfacht (Defeature)"
        Case swConfiguration_AsWelded, swConfiguration_AsMachined: Debug.Print vNamen(i) & ": Schweißkonstruktion"
    End Select
Next i

Bemerkungen

Du liest den Wert mit Configuration.Type, setzen lässt er sich nicht. Die Hilfe beschreibt die Werte nur mit ihrem Namen. Für SpeedPak und Defeature gibt es zusätzlich Configuration.IsSpeedPak und Configuration.IsDefeature, die True oder False liefern. Eine Defeature-Konfiguration ist eine Art abgeleiteter Konfiguration (Configuration.IsDerived).

Den Namen einer Konfiguration „As Welded“ erwartet zum Beispiel View.InsertWeldmentTable für die Zuschnittsliste einer Schweißkonstruktion. Welche Konfigurationen genau als swConfiguration_SheetMetal gelten, sagt die Hilfe nicht.

Verwendet von

Siehe auch

Englisches Original: swConfigurationType_e in der SOLIDWORKS API-Hilfe ↗

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