SolidWorksMakroprogrammierung

Enumeration · SwConst

swTabSlotFeatureSpacingType_e-Enumeration

Wie die Laschen und Schlitze einer Gruppe von Lasche und Schlitz (tab and slot) verteilt werden: nach Anzahl oder nach Abstand.

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

Syntax

Enum swTabSlotFeatureSpacingType_e
    EqualSpacing  = 0
    SpacingLength = 1
End Enum

Werte

KonstanteWertBedeutung
EqualSpacing0Gleichmäßig verteilt. Du gibst die Anzahl der Paare aus Lasche und Schlitz mit TabAndSlotGroupData.SpacingNumberOfInstances vor.
SpacingLength1Fester Abstand. Du gibst den Abstand mit TabAndSlotGroupData.Spacing vor. Die Anzahl der Paare berechnet SOLIDWORKS daraus.

Beispiel

' swFeat ist ein Feature Lasche und Schlitz, etwa aus SelectionMgr.GetSelectedObject6.
' swModel ist das aktive Dokument (ModelDoc2).
Dim swFeatData As SldWorks.TabAndSlotFeatureData
Dim vGruppen As Variant, bOk As Boolean
Set swFeatData = swFeat.GetDefinition
bOk = swFeatData.AccessSelections(swModel, Nothing)
vGruppen = swFeatData.SelectionGetGroups
vGruppen(0).SpacingType = EqualSpacing
vGruppen(0).SpacingNumberOfInstances = 4
bOk = swFeat.ModifyDefinition(swFeatData, swModel, Nothing)

Bemerkungen

Du liest und setzt die Art mit TabAndSlotGroupData.SpacingType, je Gruppe des Features. Die Gruppen liefert TabAndSlotFeatureData.SelectionGetGroups. TabAndSlotGroupData.SpacingNumberOfInstances gilt nur bei EqualSpacing und TabAndSlotGroupData.Spacing nur bei SpacingLength.

Die Werte haben kein Präfix sw. In VBA schreibst du sie also nur mit ihrem Namen, etwa EqualSpacing.

Verwendet von

Siehe auch

Englisches Original: swTabSlotFeatureSpacingType_e in der SOLIDWORKS API-Hilfe ↗

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