Hi NX Journaling,
I'm trying to make a journal for doing View Dependent Edit in the drawing. I recorded a journal and modified the code so that the code would run the View Dependent Edit for any number of points in a particular sheet. However i'm unable to replace the point and the body name in the code. Could you please help with the modification of the code. Below is the code.
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpenUI
Module VDE
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 startSheet As Drawings.DrawingSheet = theSession.Parts.Work.DrawingSheets.CurrentDrawingSheet
Dim viewsToSelect() As Drawings.DraftingView = startSheet.GetDraftingViews
For Each tempView as Drawings.DraftingView in viewsToSelect
Dim markId1 As Session.UndoMarkId = Nothing
markId1 = theSession.SetUndoMark(NXOpen.Session.MarkVisibility.Visible, "VDE erase objects")
Dim objects1(0) As NXOpen.DisplayableObject
Dim draftingBody1 As NXOpen.Drawings.DraftingBody = CType(tempview.DraftingBodies.FindObject("COMPONENT ModelZ 1 0"), NXOpen.Drawings.DraftingBody)
Dim draftingPoint1 As NXOpen.Drawings.DraftingPoint = CType(draftingBody1.DraftingPoints.FindObject("(Extracted Point) HANDLE R-2770"), NXOpen.Drawings.DraftingPoint)
objects1(0) = draftingPoint1
tempView.DependentDisplay.Erase(objects1)
tempView.Commit()
next
End Sub
End Module