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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Making visible 3D label with JS

flamy
12-Amethyst

Making visible 3D label with JS

How to make a 3D label visible with a javascript ?

Thanks

~ Francois

ACCEPTED SOLUTION

Accepted Solutions
katte
12-Amethyst
(To:flamy)

Please follow the below JS function to hide/show the 3D label:

$scope.hideLabel = function(){

  $scope.view.wdg['3DLabel-1']['visible']=false;              //Hides the 3D label

};

$scope.showLabel = function(){

  $scope.view.wdg['3DLabel-1']['visible']=true;            //show label.

};

You can write this code in home.js and make a call to the corresponding function. For example, in the above case provide the name of function under button click 'JS' space i.e., "hideLabel()" . So that when a button/widget is clicked it performs the action defined in the function.

View solution in original post

3 REPLIES 3
katte
12-Amethyst
(To:flamy)

Please follow the below JS function to hide/show the 3D label:

$scope.hideLabel = function(){

  $scope.view.wdg['3DLabel-1']['visible']=false;              //Hides the 3D label

};

$scope.showLabel = function(){

  $scope.view.wdg['3DLabel-1']['visible']=true;            //show label.

};

You can write this code in home.js and make a call to the corresponding function. For example, in the above case provide the name of function under button click 'JS' space i.e., "hideLabel()" . So that when a button/widget is clicked it performs the action defined in the function.

flamy
12-Amethyst
(To:katte)

Thanks .. working great . .will now continue in building my demo for LiveWorx 🙂

Do you have a recommendation on where I can get more info on the different functions like view.dwg .. etc .. available in Studio ?

I am trying to learn going through the different postings .

Thanks

~ Francois

katte
12-Amethyst
(To:flamy)

Yeah we've provided sample JS tutorial at help centre JS tutorials ​where we have listed few functions and parameters for the widgets, app parameters, properties etc., I guess that should provide a greater insights on using JS in Studio.

Announcements

Top Tags