niedzviedz
Mechanical
- Apr 1, 2012
- 307
Hello everyone,
I have assembly with many parts, and in each part there is one Datum_CSYS, which I wanna delete. I write some code, based on recorded journal, but it didn't delete it.
Any suggestions?
With best regards
Michael
I have assembly with many parts, and in each part there is one Datum_CSYS, which I wanna delete. I write some code, based on recorded journal, but it didn't delete it.
Code:
For Each datumCsys1 As NXOpen.Features.DatumCsys In myPart.features
Dim markId2 As NXOpen.Session.UndoMarkId = Nothing
markId2 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "Delete")
Dim objects1(0) As NXOpen.NXObject
objects1(0) = datumCsys1
Dim nErrs1 As Integer = Nothing
nErrs1 = theSession.UpdateManager.AddToDeleteList(objects1)
Dim notifyOnDelete2 As Boolean = Nothing
notifyOnDelete2 = theSession.Preferences.Modeling.NotifyOnDelete
Dim nErrs2 As Integer = Nothing
nErrs2 = theSession.UpdateManager.DoUpdate(markId2)
next
With best regards
Michael