Hallo,
ich habe einige UDFs zum Erstellen von immer wiederkehrenden Bohrbildern erstellt.
Nun würde ich gerne ein Journal erstellen, welches diese angelegte UDF Group exploded und anschließend in die richtige Feature Group sortiert.
Jetzt hab ich zwei Probleme.
1) ich hab von dem Befehl Explode UDF ein Journal aufgenommen, aber wenn ich es wieder abspiele kommt ein Fehler.. obwohl ich ja genau dasselbe wieder machen möchte.
2) da es mehrere UDFs gibt soll NX suchen wo "powercopy" im Namen steht. Aber weiß nicht wie man das macht. Quasi nur einen Teilstring suchen..
Hat jemand sowas schon mal versucht?
Danke!
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Sub Main (ByVal args() As String)
Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim displayPart As Part = theSession.Parts.Display
Dim markId1 As Session.UndoMarkId
markId1 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Redefine Feature")
Dim markId2 As Session.UndoMarkId
markId2 = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Redefine Feature")
Dim feature1 As Features.Feature = CType(workPart.Features.FindObject("powercopy_bb_Anb_szkd63(110)"), Features.Feature)
workPart.Features.SetEditWithRollbackFeature(feature1)
Dim featureGroup1 As Features.FeatureGroup = CType(workPart.Features.FindObject("FEATURE_SET(102)"), Features.FeatureGroup)
featureGroup1.MakeCurrentFeature()
Dim markId3 As Session.UndoMarkId
markId3 = theSession.SetUndoMark(Session.MarkVisibility.Invisible, "Start")
theSession.Preferences.Modeling.UpdatePending = False
Dim nErrs1 As Integer
nErrs1 = theSession.UpdateManager.DoUpdate(markId2)
theSession.Preferences.Modeling.UpdatePending = False
theSession.DeleteUndoMark(markId3, Nothing)
theSession.DeleteUndoMark(markId3, Nothing)
Dim featureGroup2 As Features.FeatureGroup = CType(feature1, Features.FeatureGroup)
featureGroup2.MakeCurrentFeature()
Dim nullFeatures_Feature As Features.Feature = Nothing
workPart.Features.SetEditWithRollbackFeature(nullFeatures_Feature)
theSession.DeleteUndoMark(markId2, Nothing)
End Sub
End Module
[Diese Nachricht wurde von wOOzi am 30. Mrz. 2015 editiert.]
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP