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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Please advise how I can link multiple buttons within one project A to multiple Views within another

IB_10645210
12-Amethyst

Please advise how I can link multiple buttons within one project A to multiple Views within another

Dear PTC community,

Please advise how I can link multiple buttons within one project A  to multiple Views within another project B.

When I put my code for multiple buttons/labels(within project A) linked to multiple views ( within project B) all buttons drive me to the same last in a code View. It looks like Project A for some reason ignores code for the previous Views and sees only the last one( "RemovingRVcoil")

 

IB_10645210_4-1692720272711.png

 

// $scope, $element, $attrs, $injector, $sce, $timeout, $http, $ionicPopup, and $ionicPopover services are available

//url of the deepLink of Project B
$scope.UriTest='h--------------------

IB_10645210_0-1692720235056.png

 

..thingworx.com%2FExperienceService%2Fcontent%2Fprojects%2Fmuz-fh09%2Findex.html%3FexpId%3D1'
// the view of the proejct B which should be called
$scope.cVIEW="DisassemblyRemovingtheCabinet"
// this the function what should be called by the button
//it will call project B (specified by url - and then call view
$scope.callViewProject=function(url,view){
window.location.href='vuforiaview://ptc.com/command/view-experience?url='+url+'%3FVIEW%3D'+view
}
//----------------
$scope.Removingcabinet=()=> {
$scope.callViewProject($scope.UriTest,$scope.cVIEW)
}

 

//url of the deepLink of Project B
$scope.UriTest='h--------------------

IB_10645210_1-1692720235060.png

 

..thingworx.com%2FExperienceService%2Fcontent%2Fprojects%2Fmuz-fh09%2Findex.html%3FexpId%3D1'
// the view of the proejct B which should be called
$scope.cVIEW="DisassemblyRemovingtheInverter"
// this the function what should be called by the button
//it will call project B (specified by url - and then call view
$scope.callViewProject=function(url,view){
window.location.href='vuforiaview://ptc.com/command/view-experience?url='+url+'%3FVIEW%3D'+view
}
//----------------
$scope.Removingtheinverterassembly=()=> {
$scope.callViewProject($scope.UriTest,$scope.cVIEW)
}

//url of the deepLink of Project B
$scope.UriTest='hh--------------------

IB_10645210_2-1692720235061.png

 

..thingworx.com%2FExperienceService%2Fcontent%2Fprojects%2Fmuz-fh09%2Findex.html%3FexpId%3D1'
// the view of the proejct B which should be called
$scope.cVIEW="DisassemblyRemovingtheinverterPC"
// this the function what should be called by the button
//it will call project B (specified by url - and then call view
$scope.callViewProject=function(url,view){
window.location.href='vuforiaview://ptc.com/command/view-experience?url='+url+'%3FVIEW%3D'+view
}

//----------------
$scope.RemovingInverterassemblyPCB=()=> {
$scope.callViewProject($scope.UriTest,$scope.cVIEW)
}

//url of the deepLink of Project B
$scope.UriTest='h--------------------

IB_10645210_3-1692720235061.png

 

.thingworx.com%2FExperienceService%2Fcontent%2Fprojects%2Fmuz-fh09%2Findex.html%3FexpId%3D1'
// the view of the proejct B which should be called
$scope.cVIEW="DisassemblyRemovingtheRVcoil"
// this the function what should be called by the button
//it will call project B (specified by url - and then call view
$scope.callViewProject=function(url,view){
window.location.href='vuforiaview://ptc.com/command/view-experience?url='+url+'%3FVIEW%3D'+view
}

//----------------
$scope.RemovingRVcoil=()=> {
$scope.callViewProject($scope.UriTest,$scope.cVIEW)
}

 

1 REPLY 1

Take a look at the 2 projects and colleague provided  

 

MenuA is the start point and

viewlistB is the arrival 

 

MenuA has a function below - you can see that pattern - try it out 

$scope.navto = function(x) {
  
  //
  // alter the expId variable by specifying the id number (see the experiences list for the other app)
  
  
  var dest = "https://view.vuforia.com/command/view-experience?url=http://pp-2301110001kp.portal.ptc.io%2FExperienceService%2Fcontent%2Fprojects%2Fviewlistb%2Findex.html%3FexpId%3D" + x;
  
  // and navigate to this experience
  window.location.href = dest;
  
}

 

Top Tags