Enumeration · SwConst
swTabSlotFeatureHeightType_e-Enumeration
Wie die Höhe der Laschen in einer Gruppe von Lasche und Schlitz (tab and slot) bestimmt wird: fester Wert, bis zur Schlitzfläche oder mit Versatz.
Syntax
Enum swTabSlotFeatureHeightType_e
Blind = 0
UpToSurface = 1
OffsetFromSurface = 2
End EnumWerte
| Konstante | Wert | Bedeutung |
|---|---|---|
Blind | 0 | Feste Höhe. Den Wert setzt du mit TabAndSlotGroupData.TabHeightValue. |
UpToSurface | 1 | Bis zur Fläche. SOLIDWORKS berechnet die Höhe selbst als Abstand bis zur Schlitzfläche. |
OffsetFromSurface | 2 | Versatz von der Fläche. Den Versatz zur Schlitzfläche setzt du mit TabAndSlotGroupData.TabOffsetValue, die Richtung mit TabAndSlotGroupData.TabReverseDirection. |
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).TabHeightType = Blind
vGruppen(0).TabHeightValue = 0.003 ' 3 mm
bOk = swFeat.ModifyDefinition(swFeatData, swModel, Nothing)Bemerkungen
Du liest und setzt die Art mit TabAndSlotGroupData.TabHeightType, je Gruppe des Features. Die Gruppen liefert TabAndSlotFeatureData.SelectionGetGroups. TabAndSlotGroupData.TabHeightValue gilt nur bei Blind, TabAndSlotGroupData.TabOffsetValue und TabAndSlotGroupData.TabReverseDirection nur bei OffsetFromSurface. Der Versatz wird von der Schlitzfläche aus gemessen (TabAndSlotGroupData.SelectionSlotFace).
Die Werte haben kein Präfix sw. In VBA schreibst du sie also nur mit ihrem Namen, etwa Blind.
Verwendet von
Siehe auch
Englisches Original: swTabSlotFeatureHeightType_e in der SOLIDWORKS API-Hilfe ↗
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.