SAVING

Hello,
Is it possible to get the active part name to save it with a journal code?
Thanks

The session object will give you access to the "work" part and the "display" part (among others). Generally, the display part = the work part; unless you are working in the context of an assembly file and have made one of the components the work part. In this case the assembly = the display part and the component = the work part. You can get access to these part references like this:

[sessionObject].Parts.Display
[sessionObject].Parts.Work

That said, I'm not altogether clear on exactly what you want. Do you want a reference to the part object or do you just need the name of the part file? The lines of code above will give you a reference to the part file. If you need the name of the file you can use some of the part object's properties such as .FullPath or .Leaf.

My system is working on Teamcenter environment. I recorded a journal. It is first doing a save and then performing the other jobs. But there is a problem after changing the active part. I noticed that the saving code in the Journal uses the active part name. I mean after activating another part the code become useless.
Thanks,
I am going the try the you send.