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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to get IsObjectCheckedOut ?

Mat
15-Moonstone
15-Moonstone

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?

 

 

 

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
15-Moonstone
15-Moonstone
(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".

 

Announcements


Top Tags