SolidWorksMakroprogrammierung

Enumeration · SwConst

swIndentSelectionState_e-Enumeration

Ob eine Einbuchtung die gewählte Seite des Modells behält oder entfernt. Gelesen und gesetzt über IndentFeatureData.SelectionState.

Bibliothek SwConst · 2 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swIndentSelectionStateKeepSelection

Syntax

Enum swIndentSelectionState_e
    swIndentSelectionStateKeepSelection   = 0
    swIndentSelectionStateRemoveSelection = 1
End Enum

Werte

KonstanteWertBedeutung
swIndentSelectionStateKeepSelection0Die gewählte Seite behalten.
swIndentSelectionStateRemoveSelection1Die gewählte Seite entfernen.

Beispiel

' swModel ist das aktive Teil, swFeat eine Einbuchtung, etwa aus SelectionMgr.GetSelectedObject6.
Dim swIndent As SldWorks.IndentFeatureData
Set swIndent = swFeat.GetDefinition
swIndent.AccessSelections swModel, Nothing
If swIndent.SelectionState = swIndentSelectionStateKeepSelection Then
    swIndent.SelectionState = swIndentSelectionStateRemoveSelection
Else
    swIndent.SelectionState = swIndentSelectionStateKeepSelection
End If
If False = swFeat.ModifyDefinition(swIndent, swModel, Nothing) Then swIndent.ReleaseSelectionAccess

Bemerkungen

Die Hilfe beschreibt die Werte nur mit ihrem Namen. Das Setzen von IndentFeatureData.SelectionState kehrt die Seite des Zielkörpers (IndentFeatureData.TargetBody) um, die eingedrückt wird.

Das Objekt IndentFeatureData liefert Feature.GetDefinition. Die Änderung wird erst mit Feature.ModifyDefinition wirksam. Eine neue Einbuchtung erzeugst du mit FeatureManager.InsertIndent.

Verwendet von

Siehe auch

Englisches Original: swIndentSelectionState_e in der SOLIDWORKS API-Hilfe ↗

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