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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Is there a way to load 3D model from Thingworx repository to Experience dynamically ?

Jamal8548
12-Amethyst

Is there a way to load 3D model from Thingworx repository to Experience dynamically ?

The scenario is that we are thinking to get the 3d models from windchill to thingworx and then to vuforia studio.

What can be the best scenario?
1) Integration of thingworx with windchill (any documentation)

Or 

2) We upload the 3d models in thingworx repositry and fetch them in vuforia studio? if possible is there more information about the process?

2 REPLIES 2

Hi @Jamal8548 ,

for the point 1.) data migration from  Windchill to Thingworx repository , please, contact the Windchill Customization Visualisation group/ believe configuration the worker to export data  which could be imported later - or /possibly the bether option/ you can check the Thingworx naviage so you can post your quesiton  in the Thingworx developement communty - Thingworx Navigate communty https://community.ptc.com/t5/ThingWorx-Navigate/bd-p/thingworxnavigate . So far I have informaiton from the Navigate team  there are some kind of connectors which coould be customized to different tasks and possibly this could be hepful for you to manage this task. Please, address the quesiton 1.) there . Thanks

 

to point 2)  - let say you have all data already uploaded to a folder into a think which is created from FileRepository template. In this case you can use the LoadBinary service  to start  downlaod and then to received the model in the LoadBinary-complete event some think like that:

//---loading the model
$scope.app.LoadModel = function(widgetName,path ) {
 console.warn("$scope.app.LoadModel(",widgetName,",src,",path,")")
  $scope.wdgName=widgetName 
  $scope.serviceName='LoadBinary'
  $scope.repositoryThing='CADRepository1_test'
  var parameters   =  {"path":path}  ;  console.warn(parameters)
 
  twx.app.fn.triggerDataService($scope.repositoryThing,$scope.serviceName,JSON.parse(JSON.stringify( parameters)));
  $scope.$applyAsync();                
  console.log("after callLoadBinaryContent wdgName:"+$scope.wdgName)
};


//========== the LoadBinary-complete event
$scope.$root.$on('LoadBinary-complete', function(event, args) { 
  console.log("LoadBinary-complete event");console.log("name="+event.name)
  console.warn(args.data[0].Content)
  $scope.$applyAsync(); 
 
 $timeout((data)=>{
 
 $scope.setWidgetProp( $scope.wdgName,'src',data );  
 $scope.$applyAsync();  
  },500,true,  args.data[0].Content)  
});

So in the example it will set the received data to the src of a model widgit (name of the widgit is in the variable $scope.wdgName. So to work that you need to add the Thingrepository to the external data /here CADRepository1_test and the service LoadBinary 

Also all data and services which should be accessed in Vuforia Studio should be conigured according the Studio help:

https://support.ptc.com/help/vuforia/studio/en/#page/Studio_Help_Center%2FAnonymousAccess.html%23

https://support.ptc.com/help/vuforia/studio/en/#page/Studio_Help_Center%2FGrantUserPermissions.html

 

Thank you @RolandRaytchev for always supporting the community.  you are passing data in the timeout function but the data itself is deriving from args. can you please see now i am taking the data and i mean content below and assigning it to model.

 

$scope.$root.$on('LoadBinary-complete', function(event, args) { 
  console.log("LoadBinary-complete event");console.log("name="+event.name)
  console.warn(args.data[0].Content)
  $scope.$applyAsync(); 
 
  let a =args.data[0].Content
  
  
 $timeout((a)=>{
 console.log("yes",a);
 $scope.setWidgetProp( $scope.wdgName,'src',a );  
 $scope.$applyAsync();  
  },500,true,  args.data[0].Content)  
});

 

 

 

service response below

Jamal8548_0-1721222461134.png

 

error for now

Jamal8548_1-1721222505288.png

 

this is pvz file which i am taking from thingworx repositry and setting it to the model.

Top Tags