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

How to unregister a Server using a Toolkit?

Highlighted
Newbie

How to unregister a Server using a Toolkit?

How to unregister a server using toolkit even if any of the workspace contains none uploaded modified objects?

I have tried to unregister using API ProServerUnregister() but failed when workspace contains Objects that have not yet being uploaded to server.

3 REPLIES 3

Re: How to unregister a Server using a Toolkit?

That happens when you have files (parts, drawings ...) in the local cache but not on the server side workspace. To prevent loosing those files ProServerUnregister function will fail. You have to decide if you upload the files to the server side workspace using ProServerObjectsUpload or remove the files using ProServerObjectsRemove.

Re: How to unregister a Server using a Toolkit?

For ProServerObjectsRemove, i need to pass model names to remove separately.


I want to remove only Modified/un-uploaded objects from the workspace.

I want to call a function which collects and removes all the Modified/un-uploaded objects from workspace/workspaces.

So that i can unregister the server without any conflict. Please suggest.


Thanks

Re: How to unregister a Server using a Toolkit?

If removing ALL objects from workspace is possible and/or acceptable then use ProServerObjectsRemove and pass NULL for model_names array. Something like

err = ProServerObjectsRemove(NULL,NULL);

If you have objects that need to stay in the workspace than it looks like your only option is to loop through each of them and decide if need to be removed or not.