cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to get IsObjectCheckedOut ?

Mat
13-Aquamarine
13-Aquamarine

How to get IsObjectCheckedOut ?

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?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
YaroslavSin
17-Peridot
(To:Mat)

This method is from IpfcServer not from Session object

IpfcServer.IsObjectCheckedOut()

View solution in original post

2 REPLIES 2
YaroslavSin
17-Peridot
(To:Mat)

This method is from IpfcServer not from Session object

IpfcServer.IsObjectCheckedOut()
Mat
13-Aquamarine
13-Aquamarine
(To:YaroslavSin)

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".

 

Top Tags