Ich möchte bei allen aktiven Bemassungen ein Durchmesserzeichen vor den Bemassungstext stellen. Komme aber mit dem XML FormattedText noch nicht klar.
Public Sub Durchmesser2()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
' Determine if there are any dimensions in the select set.
Dim oSelectSet As SelectSet
Set oSelectSet = oDrawDoc.SelectSet
Dim colDimensions As New Collection
Dim i As Long
For i = 1 To oSelectSet.Count
If TypeOf oSelectSet.Item(i) Is DrawingDimension Then
' Add any dimensions to the collection. We need to save them
' in something besides the selection set because once we start
' manipulating them the select set will be cleared.
colDimensions.Add oSelectSet.Item(i)
End If
Next
For i = 1 To colDimensions.Count
Dim oDimension As DrawingDimension
Set oDimension = colDimensions.Item(i)
oDimension.Text.FormattedText = "<StyleOverride Font='AIGDT'>n</StyleOverride><DimensionValue>"
Next
End Sub
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP