Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: Accessing WS and CS to find the part

$
0
0

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

model.Display();//display the window

window.Activate();//activate the window


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>