SolidWorksMakroprogrammierung

Methode · TableAnnotation

SetTextFormat-Methode (TableAnnotation)

Setzt das Textformat einer ganzen Tabelle, oder stellt es auf die Vorgabe des Dokuments zurück.

Syntax

Function SetTextFormat( _
   ByVal UseDoc As Boolean, _
   ByVal TextFormat As TextFormat _
) As Boolean
bErfolg = swTable.SetTextFormat(UseDoc, TextFormat)

Parameter

UseDocBooleanByVal
True: Format aus dem Dokument. False: TextFormat gilt.
TextFormatTextFormatByVal
Das neue Textformat (TextFormat).

Rückgabewert

True, wenn das Format gesetzt wurde, sonst False.

Beispiel

' swTable ist eine Tabelle (TableAnnotation), etwa aus View.GetFirstTableAnnotation2.
Dim swTextFormat As SldWorks.TextFormat
Set swTextFormat = swTable.GetTextFormat
swTextFormat.CharHeight = 0.0025
If False = swTable.SetTextFormat(False, swTextFormat) Then Debug.Print "Nicht gesetzt"

Bemerkungen

Ob Zellen mit eigenem Format (TableAnnotation.SetCellTextFormat) das neue Format übernehmen, sagt die Hilfe nicht.

Siehe auch

Verfügbarkeit

SOLIDWORKS 2004

Englisches Original: ITableAnnotation::SetTextFormat in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)

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