I need to search the part from the creo using Web.link . once i start the search i will look into the ws if it is not there it needs to goto windchill WS or CS and then check out and download into the creo location.
I have never actually checked out a model with weblink however the pfcServer.CheckOutObjects() and pfcCheckoutOptions deal with checking out objects. Since you are linked to Windchill you don't need to "search" for a model you can simply just "open it" and if it is not already in the workspace then it will be added to your workspace and then opened.
To open a model in weblink would go something like this.
Assume you have xyz.prt (that may or may not be in the workspace) that you want to open and display in a window.
var modelTypeClass = pfcCreate("pfcModelType");
var modelDescriptor = pfcCreate("pfcModelDescriptor").Create(modelTypeClass.MDL_PART, "xyz", null);//creating the model descriptor
var model = session.RetrieveModel(modelDescriptor);//retrieving the model into session.
//At this point you can work with the model in WebLink you do not need to open in Window
var session = pfcGetProESession();
var window= session.CreateModelWindow(model);//create a window