Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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);
}
Hi CD_10811723,
Thank you for your question.
I’d like to recommend to bring more details and context to your initial inquiry.
It also helps to have screenshot(s) to better understand what you are trying to do in your process.
This will increase your chances to receive meaningful help from other Community members.
Regards,
Community Moderation Team.