Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi there,
in the web.link "documentation" there is a function
boolean IsObjectCheckedOut (string WorkspaceName, string ObjectName)
within the "Class pfcServer"
I tried
let active_ws = oSession.ListServers().Item(0).ActiveWorkspace;
console.log (oSession.IsObjectCheckedOut(active_ws , CurModel.Filename));
But I only get "TypeError: oSession.IsObjectCheckedOut is not a function"
How do I get the information, if an object is already checked out?
Solved! Go to Solution.
This method is from IpfcServer not from Session object
IpfcServer.IsObjectCheckedOut()
This method is from IpfcServer not from Session object
IpfcServer.IsObjectCheckedOut()
Thanks for Your reply.
Unfortunately, there is no "IpfcServer" Class in Web.Link. I guess, that there is a IpfcServer in VB - Toolkit.
The according Class in Web.Link is simple called "pfcServer".
That said, the solution is quite straight forward:
let active_server = oSession.ListServers().Item(0); //usually, there is only one Windchill - server registered
let active_workspace = active_server.ActiveWorkspace;
let FileName = EPMObject.FileName;
return active_server.IsObjectCheckedOut(active_workspace , FileName ); // returns "false" / "true"
Edit:
by the way, there was a typo in my original post.
There is no property "Filename" for "CurModel". It should have been "CurModel.FileName".