Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
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.
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.