Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX Journal - vb.net - using a list of canned views

Status
Not open for further replies.

jmarkus

Mechanical
Jul 11, 2001
377
0
16
CA
I would like my journal to step through the following canned views: iso,top,front,right

using
Code:
workpart.ModelingViews.WorkView.orient(Vw,0)

where Vw is the NXOpen.View.Canned name, but because this isn't just a string or integer (at least from what I understand) I can't figure out how to do it.

I thought I could define an array with the integer value of the views as {0,1,2,6} and then step through with

Code:
For each Vw in whateverarray
workpart.ModelingViews.WorkView.orient(Vw,0)

But because I don't have the variable type correct, it doesn't work.

Can someone enlighten me?

Thanks,
Jeff

 
Replies continue below

Recommended for you

Nevermind, I figured it out:

Code:
Dim ViewNum as array=System.Enum.GetValues(GetType(Canned))
for each Vw as NXOpen.view.canned in ViewNum
[tab]workpart.ModelingViews.WorkView.orient(Vw,0)
next

Jeff
 
Status
Not open for further replies.
Back
Top