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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Can we lock/unlock a model in workspace using ProToolkit API?

skadam-5
2-Guest

Can we lock/unlock a model in workspace using ProToolkit API?

In Creo integrated with Windchill, the top level assembly only is checked-out , and bottom parts are in check-in status.

Can we put a lock to the bottom parts to prevent them from modification using ProToolkit API?

In interactive mode it is supported (PFA).

2 REPLIES 2

You can't prevent it. But you can check it inside your toolkit program before you change it from this side.

  pfcSession_ptr session = pfcGetProESession();

  pfcServer_ptr server = NULL;

  server = session->GetActiveServer();

  checkedout = server->IsObjectCheckedOut(server->GetActiveWorkspace(), mdl->GetFileName());

Br,

Eike

As far as I know you can only check the status.

Function ProServerObjectIsModified

Description
Checks if the given object is modified in workspace/locally.
Synopsis
#include <ProWTUtils.h>
ProErrorProServerObjectIsModified(
wchar_t* server
/* (In)
The server alias.
*/
wchar_t* workspace
/* (In)
The workspace name.
*/
wchar_t* object_name
/* (In)
The object name
*/
ProBoolean* checkout_status
/* (Out)
PRO_B_TRUE if the object is currently checked out.
*/
ProBoolean* modifiedLocally
/* (Out)
PRO_B_TRUE if the object is checked out and modified.
*/
ProBoolean* modifiedInWS
/* (Out)
PRO_B_TRUE if the object got modified in Workspace.
*/
)
Returns
PRO_TK_NO_ERRORThe function succeeded.
PRO_TK_BAD_INPUTSOne or more arguments was invalid.
PRO_TK_E_NOT_FOUNDThe given object is not in the workspace.
PRO_TK_BAD_CONTEXTThe server was not registered or the workspace couldn't be found on the server.
Top Tags