Hallo liebe Gemeinde,
ich möchte für einen export von .idw zu.dwg den Bemaßungstil meiner Zeichnung ändern und anschließend wieder rückgängig machen.
Ich habe einen Code geschrieben wodurch der Bemaßungstil in meinen gewünschten "APM" geändert wird. Wenn ich nach ausführen des Codes in den Stil schaue ist auch mein "APM" als aktiv eingestellt.
Aber in der Bemaßung hat sich nicht geändert.
Wenn ich auf eine Bemaßung klicke steht bei Stil "Nach Norm (DIN)", meine Aktive Norm ist doch APM....
Weis jemand was ich machen muss damit die Norm auch auf die Bemaßung angwendet wird?
Code:
ThisApplication = GetObject(, "Inventor.Application")
oDrawDoc = ThisApplication.ActiveDocument ZeichnungsPfad = oDrawDoc.FullFileName
Dim Ausgangstil As Inventor.Style = Nothing
Dim ExportStil As Inventor.Style = Nothing
Ausgangstil = oDrawDoc.StylesManager.ActiveStandardStyle
Dim i As Integer = 0
For Each oInvStil As Inventor.Style In oDrawDoc.StylesManager.StandardStyles
i += 1
If oInvStil.Name = "APM" Then ExportStil = oInvStil : Exit For
Next
If Not ExportStil Is Nothing Then oDrawDoc.StylesManager.ActiveStandardStyle = ExportStil
Exit Sub
------------------
----------------------------------
Mit freundlichen Grüßen
Felix
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP