Question
weblink retrieve model sub folder problem
I have specified a local folder as the working directory in Creo.
then want to use Weblink to retrieve models. However, I found that currently it can only retrieve models in the current directory and does not support models in subfolders.
Is there a better way to handle this?
code like this
let session = pfcGetProESession();
let currenDirectory = session.GetCurrentDirectory();
let device = currenDirectory.split(":")[0];
let path = currenDirectory.split(":")[1];
let modelDescr = pfcCreate('pfcModelDescriptor').CreateFromFileName(fileName)
modelDescr.Device = device;
modelDescr.Path = path;
let model = session.GetModelFromDescr(modelDescr)
if (!model) {
let retrieveOptions = pfcCreate('pfcRetrieveModelOptions').Create();
model = session.RetrieveModelWithOpts(modelDescr, retrieveOptions);
}

