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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

3D panel button sequence

Rakesh_kumar_S
13-Aquamarine

3D panel button sequence

In 3D panel I have placed some buttons, checkbox and labels in order. the button should play on sequence,

if i click the first button then show the check box, label and 2nd button, similarly if i click the 2nd button the  2nd checkbox, label and 3rd button should appear and so on. How to do this sequence using js.

 

 

6 REPLIES 6

Hi @Rakesh_kumar_S ,

so far I understand- you want to display 3 elements which should follow the enviroment of the current selected number - so if 1,2,3 but when 9 selected then 8,9,10 . Because, to implement scrolling will be difficult in 3D (using 3D widgets) , so I think  the best approach could be to display only few elements e.g. the 3 elements as already you displayed in the pictures and to update them. So means to rename the names according to the current selected context (only with javascript) And then the call of the button click  should be something with use js switch construct -where the name (updated on runtime) is pass to select the correct option which should be run.

so I want to provide an example to the pervious post- the idea what I meant th2023-06-30_12-45-33.jpg

So you can change (some fake of scrolling) the names of the items . There a goDown and goUP button and also the data is coming form Upload folder - json file. Here in example something like this

[
{"step":1,"description":"descr step 1","checked":true,"info":"some Info Step 1"},
{"step":2,"description":"descr step 2","checked":true,"info":"some Info Step 2"},
{"step":3,"description":"descr step 3","checked":false,"info":"some Info Step 3"},
{"step":4,"description":"descr step 4","checked":true,"info":"some Info Step 4"},
{"step":5,"description":"descr step 5","checked":false,"info":"some Info Step 5"},
{"step":6,"description":"descr step 6","checked":false,"info":"some Info Step 6"},
{"step":7,"description":"descr step 7","checked":true,"info":"some Info Step 7"},
{"step":8,"description":"descr step 8","checked":true,"info":"some Info Step 8"},
{"step":9,"description":"descr step 9","checked":false,"info":"some Info Step 9"},
{"step":10,"description":"descr step 10","checked":false,"info":"some Info Step 10"},
{"step":11,"description":"descr step 11","checked":false,"info":"some Info Step 11"},
{"step":12,"description":"descr step 12","checked":true,"info":"some Info Step 12"}
]

When a button is click it will check the current text - here will extract the number from there e.g.

2023-06-30_12-54-47.jpg

where the function e.g.:

//----------------------------------------------------------------------------------------
$scope.app.doStepFromName=function(featName){
  let Name = $scope.app.view.Home.wdg[featName].text
  console.log("widget clicked::"+ Name);
  let num= Name.split('::')[1]
   msg_txt="So some action for Number   "+num+" is doen  here !"
   console.warn(msg_txt);
   var msg = new SpeechSynthesisUtterance(msg_txt);
   window.speechSynthesis.speak(msg);
}

  

Thaks for your reply, but i need different kind of solution, my question was,

if i clicked 1st button then show the 1st check box, 1st label & 2nd button similarly if i click the 2nd button then show the 2nd check box, 2nd label  & 3rd button. like these i want.

 

Great, thanks for the feedback! I think for your requirement you need just to change the provided example by little editing of the Js code. My previous post should not provide an exact solution but it will be some hint and further advice - which could be helpful  for you  to achieve the require goal. Please, let me know if you have some trouble to achieve this. What did you do and what was the problem, what was not working then?

Thanks

I created animation in illustrate with 12 sequences, after that I imported in Vuforia studio, now I need a sequence in separate buttons.

 

EX:

       If I click 1st button --> play the 1st sequence,

       If I click 2nd button --> play the 2nd sequence similarly 

       If I click a 3rd button --> play the 3rd sequence 

like this i need to sequence work, any js is there or any other options is there for to do this sequence play.

Please check this sample project  . There is an model where is an figure with 12 step. Clicking on a button will call the step with the same number as the button. The button is named by reading of json file. Possibly this example is helpful for you. Thanks

Announcements

Top Tags