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

How to unregister a Server using a Toolkit?

aalavelli-2
1-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.


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

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.

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

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.

Announcements


Top Tags