Enumeration · SwConst
swBendAllowanceTypes_e-Enumeration
Wie die Länge einer Biegung in der Abwicklung berechnet wird: Biegetabelle, K-Faktor, Biegezugabe, Biegeabzug oder Tabelle.
Syntax
Enum swBendAllowanceTypes_e
swBendAllowanceBendTable = 1
swBendAllowanceKFactor = 2
swBendAllowanceDirect = 3
swBendAllowanceDeduction = 4
swBendAllowanceBendCalculationTable = 5
swBendAllowanceGaugeTable = 6
End EnumWerte
| Konstante | Wert | Bedeutung |
|---|---|---|
swBendAllowanceBendTable | 1 | Biegetabelle. Die Datei steht in CustomBendAllowance.BendTableFile. |
swBendAllowanceKFactor | 2 | K-Faktor. Der Wert steht in CustomBendAllowance.KFactor. |
swBendAllowanceDirect | 3 | Biegezugabe als fester Wert in CustomBendAllowance.BendAllowance. |
swBendAllowanceDeduction | 4 | Biegeabzug als fester Wert in CustomBendAllowance.BendDeduction. |
swBendAllowanceBendCalculationTable | 5 | Berechnungstabelle für Biegungen (bend calculation table). Die Datei steht in CustomBendAllowance.BendCalculationTableFile. |
swBendAllowanceGaugeTable | 6 | Blechstärkentabelle (gauge table). |
Beispiel
' swModel ist das aktive Dokument (ModelDoc2), ein Blechteil.
' swFeat ist das Feature „Blech“, etwa aus SelectionMgr.GetSelectedObject6.
Dim swBlech As SldWorks.SheetMetalFeatureData
Dim swZugabe As SldWorks.CustomBendAllowance
Set swBlech = swFeat.GetDefinition
Set swZugabe = swBlech.GetCustomBendAllowance
swZugabe.KFactor = 0.4
swZugabe.Type = swBendAllowanceKFactor ' Type immer zuletzt setzen
swBlech.SetCustomBendAllowance swZugabe
swFeat.ModifyDefinition swBlech, swModel, NothingBemerkungen
Den Wert liest und setzt du über CustomBendAllowance.Type. Das CustomBendAllowance-Objekt liefern die Feature-Daten der Blech-Features, etwa SheetMetalFeatureData.GetCustomBendAllowance für das ganze Teil oder OneBendFeatureData.GetCustomBendAllowance für eine einzelne Biegung. Zurück ins Feature kommt es mit SetCustomBendAllowance und Feature.ModifyDefinition.
Jede Eigenschaft von CustomBendAllowance setzt die Art automatisch mit: Wer zuletzt BendDeduction setzt, bekommt swBendAllowanceDeduction, auch wenn Type vorher anders gesetzt war. Setz Type deshalb immer als Letztes.
BendAllowanceType von BendsFeatureData und OneBendFeatureData ist veraltet. Nimm stattdessen GetCustomBendAllowance und SetCustomBendAllowance. Die Hilfe beschreibt die Werte nur mit ihrem Namen.
Verwendet von
Siehe auch
Englisches Original: swBendAllowanceTypes_e in der SOLIDWORKS API-Hilfe ↗
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.