SolidWorksMakroprogrammierung

Enumeration · SwConst

swBlockInstanceTextDisplay_e-Enumeration

Wie die Texte (Notizen) einer Blockinstanz angezeigt werden. Für SketchBlockInstance.TextDisplay.

Bibliothek SwConst · 3 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swBlockInstanceTextDisplayNone

Syntax

Enum swBlockInstanceTextDisplay_e
    swBlockInstanceTextDisplayNone   = 1
    swBlockInstanceTextDisplayAll    = 2
    swBlockInstanceTextDisplayNormal = 3
End Enum

Werte

KonstanteWertBedeutung
swBlockInstanceTextDisplayNone1Dem Namen nach wird kein Text angezeigt.
swBlockInstanceTextDisplayAll2Dem Namen nach werden alle Texte angezeigt.
swBlockInstanceTextDisplayNormal3Dem Namen nach die normale Anzeige, so wie die Texte im Block angelegt sind.

Beispiel

' swBlockDef ist eine SketchBlockDefinition, etwa aus SketchManager.GetSketchBlockDefinitions.
Dim vInst As Variant, i As Long
Dim swBlockInst As SldWorks.SketchBlockInstance
vInst = swBlockDef.GetInstances
If Not IsEmpty(vInst) Then
    For i = 0 To UBound(vInst)
        Set swBlockInst = vInst(i)
        swBlockInst.TextDisplay = swBlockInstanceTextDisplayNone
    Next i
End If

Bemerkungen

Die Hilfe beschreibt die Werte nur mit ihrem Namen. SketchBlockInstance.TextDisplay liest oder setzt, ob die Texte der Blockinstanz angezeigt werden. Die Hilfe sagt nicht, wie sich swBlockInstanceTextDisplayNormal und swBlockInstanceTextDisplayAll genau unterscheiden.

Verwendet von

Siehe auch

Englisches Original: swBlockInstanceTextDisplay_e in der SOLIDWORKS API-Hilfe ↗

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