Showing results for 
Search instead for 
Do you mean 
Reply

Is it possible to switch between modeling and drafting

Hi all

 

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?

Best Regards
Christian
4 REPLIES

Re: Is it possible to switch between modeling and drafting

Hi!

 

When using VB and NXOpen you can call

    Dim curSession As NXOpen.Session = NXOpen.Session.GetSession()

    ' To enter Drafting Application
    curSession.ApplicationSwitchImmediate("UG_APP_DRAFTING")

    ' To enter Modeling Application

    curSession.ApplicationSwitchImmediate("UG_APP_MODELING")

    ...

to switch between different applications.

 

Note:

To use this function you will need NX10.

 

I hope this helps!

Re: Is it possible to switch between modeling and drafting

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.

 

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Is it possible to switch between modeling and drafting

Hi there,

For NX10, it should be okay, but I'm still using NX6 for development, thanks any way!
Best Regards
Christian

Re: Is it possible to switch between modeling and drafting

Hi Ken,

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)

1.PNG

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)
layout1.Open()

Best Regards
Christian