Hey Eonwe,
es hat doch funktioniert!
Ich muss es nur noch in des große Ganze einfügen...
Danke für den Schubs in die richtige Richtung.
Bin dadurch auf folgendes gestoßen:
https://www.eng-tips.com/viewthread.cfm?qid=386920Mein Journal(-fragment) sieht so aus:
Option Strict Off
Option Explicit On
Imports System
Imports NXOpen
Module Module1
' Explicit Activation
' This entry point is used to activate the application explicitly
Sub Main()
Dim theSession As Session = Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
Dim lw As ListingWindow = theSession.ListingWindow
Dim myCounter As Integer = 0
lw.Open()
For Each myFormLage As NXOpen.Annotations.Gdt In displayPart.Gdts
myCounter += 1 'hier zähle ich nur die zu ändernden Objekte... wird entfallen
lw.WriteLine(myCounter)
Dim objects9(0) As NXOpen.DisplayableObject
Dim theUI As UI = UI.GetUI()
objects9(0) = CType(myFormLage, NXOpen.Annotations.Gdt)
Dim editSettingsBuilder9 As NXOpen.Annotations.EditSettingsBuilder = Nothing
editSettingsBuilder9 = workPart.SettingsManager.CreateAnnotationEditSettingsBuilder(objects9)
Dim editsettingsbuilders9(0) As NXOpen.Drafting.BaseEditSettingsBuilder
editsettingsbuilders9(0) = editSettingsBuilder9
workPart.SettingsManager.ProcessForMultipleObjectsSettings(editsettingsbuilders9)
Dim fontIndex9 As Integer = Nothing
fontIndex9 = workPart.Fonts.AddFont("iso-1", NXOpen.FontCollection.Type.Nx)
editSettingsBuilder9.AnnotationStyle.LetteringStyle.GeneralTextFont = 4
editSettingsBuilder9.AnnotationStyle.LetteringStyle.GeneralTextSize = 3.5
editSettingsBuilder9.AnnotationStyle.LetteringStyle.GeneralTextCharSpaceFactor = 1.0
editSettingsBuilder9.AnnotationStyle.LetteringStyle.GeneralTextAspectRatio = 1.0
editSettingsBuilder9.AnnotationStyle.LetteringStyle.GeneralTextLineSpaceFactor = 1.0
Dim nXObject9 As NXOpen.NXObject = Nothing
nXObject9 = editSettingsBuilder9.Commit()
editSettingsBuilder9.Destroy()
Next
lw.Close()
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image when the NX session terminates
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination
'----Other unload options-------
'Unloads the image immediately after execution within NX
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
'Unloads the image explicitly, via an unload dialog
'GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Explicitly
'-------------------------------
End Function
End Module
Einen schönen Abend noch
Marc
------------------
"Das kann man so machen, aber dann ist es halt Sch...!"
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP