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

How Do i get in the HoloLens back into the library with a command

JS_10688265
3-Newcomer

How Do i get in the HoloLens back into the library with a command

Hello

How do i get back from the experince to the library with a command. I found the command $scope.goToLibrary(); but it doesn't work. I know that i get back to the scan process with a voice command, but i want to get back with a button press.

Can someone help me please, thanks in advance

 

4 REPLIES 4

It appears like you are on the right track by pressing a button to return to the Vuforia Studio library. The command $scope.goToLibrary(); should work.

  • Create a Button: Simply drag and drop a button widget onto your canvas.
  • Set up the Click Event: Select the button and navigate to the DETAILS pane.
  • Add Javascript, Click on the JS icon next to the Click event.
  • Enter the command, In the Expression box, type the following JavaScript code: $scope.goToLibrary();

This should link the $scope.goToLibrary(); function to the button push, allowing you to return to the library whenever the button is hit.

 

Invoke Functions from a Button -https://support.ptc.com/help/vuforia/studio/en/index.html#page/Studio_Help_Center/Beginner_JSInvokeFunction.html

 

Is this helpful in resolving your issue?

Hi,

Firstly thanks for your answer.

I have already tried that command via function in the javascript function and linking the button to it, but this way it doesn't work.

Have I to implement directly into the button to make it work, or can i use the javascript command section and use it via function?

Hi @JS_10688265 ,

for me that function will be new. What I know is e.g.  the $scope.app.fn.navigateToScanMode(). 

Where did you find that function?

So printing the scope e.g. :

 

 

///////////////////////////////////////////
angular.element(document).ready(function() { console.warn($scope);})
///////////////////////////////////////////

 

 

and then in preview checked in the Cntrl+Shift+I debuging console check the $scope but the printing does not contain such function :

2024-11-20_11-03-25.jpg

also checked the $scope.app.fn object 

2024-11-20_11-05-23.jpg

here also could not find any function with that name by default function of eyewear project.

Ok when I define a function e.g.

 

 

$scope.goToLibrary = ()=>{
//... you go2library definition here
};

 

 

then you will find that in the $sope object. 

Are there any specific extension installed. Possibly function is defined by extension or by some loaded javascript module?

Also,could you check, please, your Home.js or any <view_name>.js - in the project where you find that function if there is a javaScript defintion of that. It will be interresting what that defintion implement. Thanks

because I could not find a option to go to library mode- means on HoloLens 2 coresponds to the voice command : “Hey View, scan.” followed “Hey View, show Library.” Therefore reported that issue/quesiton to R&D team as Jira VTS-2209 - so to check if there is still such option. If there is no such option  then  the issue should  be addressed as enhancement. I will regularry check the issue and when there is update or feedback from development team regarding to the issue  I will share that here (possibly someone form dev team will share info directly to this post). Thanks

Announcements

Top Tags