cancel
Showing results for 
Search instead for 
Did you mean: 

API of return to model from CAE post

Creator
Creator

Dear all,After show fringe of result,I can return to show model by click "return to model" button.But this function don't support journal,I want to know the API of this function.

2015-11-18_22-19-19.png

4 REPLIES

Re: API of return to model from CAE post

Siemens Phenom Siemens Phenom
Siemens Phenom

 

If you cannot record the action in a Journal, it is possible that there is no API for that yet.

 

But if you are running NX10, you could try switching to the modeling application with the ApplicationSwitchImmediate() method, which is part of the Session class.  (I have not tested this in the situation that you described.)

Re: API of return to model from CAE post

Siemens Phenom Siemens Phenom
Siemens Phenom

You need to delete the PostView to return to the model. If you have created the postview in your code, you should have the postview ID that was assigned on creation. Use Session.Post.PostviewDelete() to delete it.

 

The following python code will blindly delete all post views that exist:

 

import NXOpen

theSession = NXOpen.Session.GetSession()
theLw = theSession.ListingWindow

def main(): 

    theLw.Open()

    for postId in theSession.Post.GetPostviewIds():

        theLw.WriteLine("Closing Postview ID: " + str(postId))
        theSession.Post.PostviewDelete(postId)

# Main program.

if __name__ == "__main__":
    main()

Re: API of return to model from CAE post

Creator
Creator

Thank you,this method work fine.

Re: API of return to model from CAE post

Creator
Creator
Thank you too!