Is it possible to switch between modeling and drafting or other application gate by api (VB.Net)?
I found it only could be achieved by macro, but I have no idea how to call marco in VB.Net...
Anyone has good idea to achieve that?
When using VB and NXOpen you can call
Dim curSession As NXOpen.Session = NXOpen.Session.GetSession()
' To enter Drafting Application
' To enter Modeling Application
to switch between different applications.
To use this function you will need NX10.
I hope this helps!
To a large extent, just don't worry about it. *Almost* all calls can be done from any application.
To get a drawing visible for user interaction display the drawing.
To get a model view visible, (IIRC) replace the layout.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled
I think I made a mistake, I use Journal to record in drafting, but I recall it in modeling, so it doesn't work.
Now I record it in modeling, it's work now. (I just add a note in the drawing)
But when I in the drafting, I had some action need to do in the modeling(just like select a body), is there any way to achieve it?
I still haven't catch your suggesions like...
"To get a drawing visible for user interaction display the drawing."
"To get a model view visible, (IIRC) replace the layout."
When I record the journal, the function named "display sheet" is invalid.( see the attachment)
So I have no idea how to get the model in the drafting through another way.
I used open layout in the VB.net, but it was failed when I call the program in drafting...
Dim layout1 As Layout = CType(workPart.Layouts.FindObject("L1"), Layout)