Skip to main content
15-Moonstone
August 9, 2023
Question

Models and images brought into experiences from ThingWorx Repository don't appear in View

  • August 9, 2023
  • 2 replies
  • 3332 views

I've been trying to figure out why the models and images that we are trying to bring in from a ThingWorx File Repository aren't appearing. I was stoked when I saw the e-mail about the latest update to View thinking that the issue would be solved, but then I tried it and they didn't show up. So, I'm back at square one. My biggest issue is that I'm not getting any errors because of this in ThingWorx or Vuforia, so I have no idea how to fix it. Does anybody have an idea as to what could be causing this?

2 replies

16-Pearl
August 21, 2023

would you be open to provide how you are getting the images - JS or Binding or maybe both 

Ike@ACE15-MoonstoneAuthor
15-Moonstone
August 23, 2023

This is the code I'm using:

 
//************************************************************************************
//Sets the referenced image or model artifact by pulling it from ThingWorx
// ** params **
//  fileName - string - the name of the file that is being referenced
// fileFolder - string - one of three strings is passed - '/images/' || '/figures/'
// || '/models/' - which determines which folder in ThingWorx to look in and
// which Studio widget to set the source to
//************************************************************************************
$scope.setThingWorxFile = (fileName, fileFolder) => {

let repositoryPath = '/Thingworx/FileRepositories/TutorialExperiences.Repository/';
let filePath = repositoryPath + $scope.ThingWorxTableName + fileFolder;
let fullFilePath = filePath + fileName;

switch (fileFolder) {
case '/images/':
$scope.view.wdg['InfoImage'].src=fullFilePath;
break;
case '/figures/':
$scope.view.wdg['model-1']['sequence'] = fullFilePath;
break;
case '/models/':
$scope.view.wdg['model-1'].src=fullFilePath;
break;
}
}

 

I'm not using any External Data entries for this as I was told using the specific links was good enough. Am I wrong?

16-Pearl
August 23, 2023

As long as the links are accessible you can use any web link (that can be accessed ) or resource link