Submitted by neshom on Sun, 02/21/2016 - 18:38
Forums:
I'd like to make a journal to Show Only selected components. I tried to record the journal by using the command Show Only, however, it does not record anything. I am wondering if this can be done using journal or not?
Thanks in advance.
re: show only
One way to replicate the "show only" behavior is to hide everything except the selected object(s).
Thanks for your reply. I am
Thanks for your reply. I am not sure how I can select everything except the selected parts. Do you have an example journal for this?
re: hide all but selected
I have code that does this, but it is part of a larger program; it is not in a simple example form. I used the .AskVisibleObjects method of the work view and hid all the visible objects then un-hid the object(s) of interest.
Below are two subroutines from the project. They cannot be run by themselves, they need more supporting code but it should give you the idea.
Private Sub HideObjects()
_visibleObjects = workPart.Views.WorkView.AskVisibleObjects
For Each temp As DisplayableObject In _visibleObjects
temp.Blank()
Next
Dim interestingObject As DisplayableObject = _exportSolid
interestingObject.Unblank()
End Sub
Private Sub UnHideObjects()
For Each temp As DisplayableObject In _visibleObjects
temp.Unblank()
Next
End Sub
Also check...
Also check in:
{NX install directory}\UGOPEN\SampleNXOpenApplications\.NET\Selection
for some example code of how to "select all" with certain filters set.
Thank you very much. I
Thank you very much. I appreciate your help. I wish there was a way to accept your response as answer.