Skip to main content
1-Visitor
March 31, 2021
Solved

Calling functions with voice commands

  • March 31, 2021
  • 1 reply
  • 1260 views

Hello,

I was trying to call a function setModel(); with by using Application Events with voice Commands.

First thing I tried was simply calling the function: 

setModel("schwader_aufgeklappt_Low.pvz");

But that seemed not to be working, after a bit of searching here, I found a post here that said, that I have to use viewCtrl. before that

viewCtrl.setModel("schwader_aufgeklappt_Low.pvz");

So I gave that a try. In preview it is now working, but isn't working on the HoloLens itself.

Does anyone have clue why that is and how to fix it?

Roman_G_0-1617206417148.png

 

Best answer by dsgnrClarK

try this

 

app.setModel("schwader_aufgeklappt_Low.pvz");

 

whitelist in View.js declare function using

$scope.app.setModel = function(val){
 $scope.view.wdg['model-1'].src=...
}

 

1 reply

16-Pearl
April 1, 2021

try this

 

app.setModel("schwader_aufgeklappt_Low.pvz");

 

whitelist in View.js declare function using

$scope.app.setModel = function(val){
 $scope.view.wdg['model-1'].src=...
}