cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

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

Ike@ACE
13-Aquamarine

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

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?

11 REPLIES 11

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

Ike@ACE
13-Aquamarine
(To:sgreywilson)

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?

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

Ike@ACE
13-Aquamarine
(To:sgreywilson)

And to be accessible it just needs to be published on the same server that the resource links point to, right?

The main issue with links is they must be open and not cause any security exceptions that the ES server may see like CORS for example.

 

As an example its easy to add content to Thingworx Repo but if you don't have that option then you can deploy to the ES server 

 

Ike@ACE
13-Aquamarine
(To:sgreywilson)

I tried calling GetFileListingWithLinks, instead of just directly using the links like I was above and it didn't work either. I'm back to thinking that there is some obscure permission that I'm missing.

Execute the experience and then take a look and the Thingworx logs and also look at the console (F12) 

 

That may provide additional info like permission denied 

Ike@ACE
13-Aquamarine
(To:sgreywilson)

I went through that process, found some errors, and fixed them. Still not working, though. There's no errors that indicate why, either. I'm also tried using an administrative user. Still no dice. Now I don't think it's a permissions issue. Round and round we go.

When you use GetFileListingWithLinks you should be able to copy the url for example or just click on it when trying this inside Thingworx. 

 

for example - if this does not work then get me a screen shot

 

https://pp-2301110001kp.portal.ptc.io/Thingworx/FileRepositories/CAD_Repo/PVZFolder/000-FJ21611AP_High.metadata.json

 

sgreywilson_0-1693252228040.png

 

Ike@ACE
13-Aquamarine
(To:sgreywilson)

I figured out the problem I was having in the code, and now everything works in preview again. However, when I then tested it in a HoloLens 2 using the View app, there was no model or images being pulled into the experience. I'm starting to think that this might be a problem with View, instead.

Top Tags