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

How to get View name?

TomasCharvat
14-Alexandrite

How to get View name?

Hello friends

 

how is possible to obtain actual View name in JS?

 

thank you for every post.

 

Tomas

1 ACCEPTED SOLUTION

Accepted Solutions

You should be able to use the window.location.hash property to find this, along these lines:

var viewname = window.location.hash.substring(2);

 

View solution in original post

2 REPLIES 2

You should be able to use the window.location.hash property to find this, along these lines:

var viewname = window.location.hash.substring(2);

 

Hello ClayHelberg

 

Thank you much again. This syntax is exactly what I need.

It works really fine for both -  2D and 3D Views.

 

I tried to put window and window.location to console.log() and I was really suprised how much information I can obtain. This is really inspirative for me.

 

Regards

 

Tomas

 

PS: for the final recap:

/**
* Function return name of active View.
*
* @return (String) - view name.
*/
$scope.getViewName = function() {
var name = window.location.hash.substring(2);
console.log(name);
return name;
}

 

Announcements
Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection