Enumeration · SwConst
swBOMConfigurationAnchorType_e-Enumeration
An welcher Ecke eine Tabelle in der Zeichnung verankert ist, etwa Stückliste, Bohrungstabelle oder Revisionstabelle: oben oder unten, links oder rechts.
Syntax
Enum swBOMConfigurationAnchorType_e
swBOMConfigurationAnchor_TopLeft = 1
swBOMConfigurationAnchor_TopRight = 2
swBOMConfigurationAnchor_BottomLeft = 3
swBOMConfigurationAnchor_BottomRight = 4
End EnumWerte
| Konstante | Wert | Bedeutung |
|---|---|---|
swBOMConfigurationAnchor_TopLeft | 1 | Ecke oben links. |
swBOMConfigurationAnchor_TopRight | 2 | Ecke oben rechts. |
swBOMConfigurationAnchor_BottomLeft | 3 | Ecke unten links. |
swBOMConfigurationAnchor_BottomRight | 4 | Ecke unten rechts. |
Beispiel
' swView ist eine Zeichenansicht (View), etwa aus SelectionMgr.GetSelectedObject6.
Dim swBomTable As SldWorks.BomTableAnnotation
Dim sVorlage As String
sVorlage = "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\lang\german\bom-standard.sldbomtbt"
Set swBomTable = swView.InsertBomTable6(True, 0, 0, swBOMConfigurationAnchor_TopLeft, _
swBomType_PartsOnly, "", sVorlage, False, swNumberingType_None, False, False, False)
If swBomTable Is Nothing Then Debug.Print "Stückliste nicht eingefügt."Bemerkungen
Trotz des Namens gilt die Enumeration nicht nur für Stücklisten: Die Hilfe nutzt sie auch für allgemeine Tabellen, Revisions-, Bohrungs-, Biege-, Stanz- und Schweißtabellen. Bei einer vorhandenen Tabelle liest oder setzt du die Ecke mit TableAnnotation.AnchorType.
Beim Einfügen wirkt der Wert zusammen mit UseAnchorPoint: Ist er True und hat das Blattformat einen passenden Ankerpunkt, setzt SOLIDWORKS die Tabelle dorthin, sonst an die Koordinaten X und Y. Bei allgemeinen Tabellen (DrawingDoc.InsertTableAnnotation2, ModelDocExtension.InsertGeneralTableAnnotation) wird der Ankertyp ignoriert, wenn du eine Tabellenvorlage angibst.
Verwendet von
DrawingDoc.InsertTableAnnotation2 ModelDocExtension.GetGeneralTableAnnotation ModelDocExtension.InsertGeneralTableAnnotation Sheet.InsertRevisionTable Sheet.InsertRevisionTable2 TableAnnotation.AnchorType View.InsertBendTable View.InsertBomTable2 View.InsertBomTable3 View.InsertBomTable4 View.InsertBomTable5 View.InsertBomTable6 View.InsertHoleTable View.InsertHoleTable2 View.InsertHoleTable3 View.InsertPunchTable View.InsertWeldmentTable View.InsertWeldTable
Englisches Original: swBOMConfigurationAnchorType_e in der SOLIDWORKS API-Hilfe ↗
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.