Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

How to delete unnecessary objects in detail view?

I met a problem that when I create a detail view, I found the detail view will get a copy(object,like line, arc, group) from parent view, I don't want it. Is there any way to delete these unnecessary objects or maybe there is a way when I create a detail view could leave these object which I don't want? 

 

I use  VB .Net to programming under NX10.

 

Thanks in advance!

Best Regards
Christian
2 REPLIES

Re: How to delete unnecessary objects in detail view?

[ Edited ]

I found way to delete unnecessary objects in the drafting view. 

Best Regards
Christian
Solution
Solution
Accepted by topic author Christian0313
‎03-23-2017 04:21 AM

Re: How to delete unnecessary objects in detail view?

[ Edited ]

I found way to delete unnecessary objects in the drafting view. 

 

draftingView.Expand()

Dim tag2() As NXOpen.Tag = Nothing
Dim tag1 As NXOpen.Tag = NXOpen.Tag.Null
Dim groupTag As NXOpen.Tag = NXOpen.Tag.Null
Dim allGroups As ArrayList = New ArrayList


Dim n_visible As Integer
Dim n_clipped As Integer
Dim clipped() As NXOpen.Tag = Nothing

theUFSession.View.AskVisibleObjects(draftingView.Tag, n_visible, tag2, n_clipped, clipped)


For z = 1 To n_visible

Try

theUFSession.View.CycleObjects(draftingView.Tag, UFView.CycleObjectsEnum.DependentObjects, groupTag)
Catch ex As Exception

End Try

Try

theUFSession.Group.AskGroupOfTag(groupTag, tag1)

theUFSession.Obj.DeleteObject(tag1)
Catch ex As Exception
End Try

Next

Best Regards
Christian