Methode · DrSection
GetTextFormat-Methode (DrSection)
Liefert das Textformat der Texte an der Schnittlinie.
Syntax
Function GetTextFormat() As ObjectSet swTextFormat = swSchnitt.GetTextFormatRückgabewert
Das Textformat (TextFormat) der Schnittlinie.
Beispiel
' swSchnitt ist eine Schnittlinie (DrSection), etwa aus View.GetSection.
Dim swTextFormat As SldWorks.TextFormat
Set swTextFormat = swSchnitt.GetTextFormat
Debug.Print "Schrift: " & swTextFormat.TypeFaceName
Debug.Print "Zeichenhöhe: " & swTextFormat.CharHeight * 1000# & " mm"
Debug.Print "Aus Dokument: " & swSchnitt.GetUseDocTextFormatBemerkungen
Die Texte sind nach DrSection.GetTextInfo meist die Bezeichnung an beiden Enden der Schnittlinie. Deren Lage liefert GetTextInfo, die Texthöhe TextFormat.CharHeight aus diesem Textformat. Ändern kannst du das Format mit DrSection.SetTextFormat.
Siehe auch
Verfügbarkeit
SOLIDWORKS 2000
Englisches Original: IDrSection::GetTextFormat in der SOLIDWORKS API-Hilfe ↗ (dort mit dem .NET-Namen)
Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.