Ich habe mal ein kleines Programm in VBA geschrieben.
Es konvertiert allerdings nur die Maßzahl, nicht die Maßlinie, Maßhilfslinien oder die Pfeile (eigenen Maßstil erzeugen).
Möglicherweise hilft es Dir
Gruß
Guido
Hier der Code
Einfach in bestehende DVB einbinden !
Sub chdimArchi()
Dim obj As Object
Dim typ As Variant
Dim val As Double
Dim val2 As String
Dim stellekomma As Single
Dim HochZah As String
Dim Vorkom As String
Dim Vorkom1 As String 'vor Punkt
Dim Vorkom2 As String 'nach Punkt
Dim TXTlenght As Single
On Error Resume Next
For Each obj In ThisDrawing.ModelSpace 'PaperSpace 'ModelSpace
typ = obj.EntityType
If typ = 9 Or typ = 13 Or typ = 12 Or typ = 15 Or typ = 14 Then
val = obj.Measurement
val2 = Round(val, 1)
TXTlenght = Len(val2)
stellekomma = InStr(val2, ",")
If stellekomma = 0 Then
Vorkom = val2
Else
HochZah = Right(val2, TXTlenght - stellekomma)
Vorkom = Left(val2, stellekomma - 1)
End If
TXTlenght = Len(Vorkom)
If TXTlenght < 3 Then Vorkom = Vorkom
If TXTlenght > 2 Then
Vorkom1 = Left(Vorkom, TXTlenght - 2)
Vorkom2 = Right(Vorkom, 2)
Vorkom = Vorkom1 & "." & Vorkom2
End If
If typ = 12 Then obj.TextOverride = "%%C" & Vorkom & "{\H2x;}{\A2;\H0.71x;\C7;\S" & HochZah & ";}"
If typ = 14 Then obj.TextOverride = "R" & Vorkom & "{\H2x;}{\A2;\H0.71x;\C7;\S" & HochZah & ";}"
If typ = 9 Or typ = 13 Or typ = 15 Then obj.TextOverride = Vorkom & "{\H2x;}{\A2;\H0.71x;\C7;\S" & HochZah & ";}"
HochZah = "" 'Wert zuruecksetzen
End If
Next obj
End Sub
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP