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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Adding labels or images like pop up at starting of sequence steps

nraichura
12-Amethyst

Adding labels or images like pop up at starting of sequence steps

Hello 

 

I have almost 10 steps in my animation i want to display each component number in 3d image at each every steps and after performing each steps image should be hide and unhide automatically.

 

Let me know with solution is it possible or not?

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
sdidier
17-Peridot
(To:nraichura)

Hello,

 

To have more informations about steps on a Model, we have access to Steps and Current Step variables.

we can access it in Javascript like that :

 

$scope.setWidgetProp('model-1', 'currentStep', 4);

 

 

Where 'model-1' is the Friendly Name of the Model

4 is the step to play

 

This part of javascript code, play the step 2 of Sequence selected in Sequence list for the Model named model-1 in the Home View.

A delay of 0.5 secondes is applied to be sure that these actions have been done.

 

 

  $timeout(function () {
    $scope.view.wdg['model-1']['currentStep']=2;

    $scope.$root.$broadcast('app.view["Home"].wdg["model-1"].svc.play');
  }, 500);

 

 

Best regards,

Samuel

View solution in original post

3 REPLIES 3
sdidier
17-Peridot
(To:nraichura)

Hello,

 

The only solution that I see is to use a custom Javascript code.

 

  1. In Vuforia Studio, in the Project, upload the Images needed for each Components
  2. In Home View, create 3D Image Widgets as needed
  3. For 3D Image Widget, in Resource field, assign an Image
  4. In Home View, in Home.js, create an array to link a Step to an 3D Image (or 3D Images if needed)
  5. Create a javascript Function to play the Sequence steps by step and to display 3D Image Widget(s) for the current Step and hide all other 3D Image Widget(s)More details in this thread to play Sequence in a Javascript Function :

https://community.ptc.com/t5/Studio/How-to-play-all-the-Sequences-pvi-one-by-one-on-a-single-click/m-p/525857?advanced=false&collapse_discussion=true&filter=location&location=forum-board:studio&q=sequence%20play&search_type=thread

 

To display a Widget use this Function :

$scope.setWidgetProp( widget_name, "visible", true );

Change widget_name by the Friendly Name of the 3D Image Widget.

 

To hide it, replace true by false

 

Best regards,

Samuel

nraichura
12-Amethyst
(To:sdidier)

hello ,

 

I have gone through solution but i need js for steps not for different sequence let me know how we can do the same.

 

Thank you

sdidier
17-Peridot
(To:nraichura)

Hello,

 

To have more informations about steps on a Model, we have access to Steps and Current Step variables.

we can access it in Javascript like that :

 

$scope.setWidgetProp('model-1', 'currentStep', 4);

 

 

Where 'model-1' is the Friendly Name of the Model

4 is the step to play

 

This part of javascript code, play the step 2 of Sequence selected in Sequence list for the Model named model-1 in the Home View.

A delay of 0.5 secondes is applied to be sure that these actions have been done.

 

 

  $timeout(function () {
    $scope.view.wdg['model-1']['currentStep']=2;

    $scope.$root.$broadcast('app.view["Home"].wdg["model-1"].svc.play');
  }, 500);

 

 

Best regards,

Samuel

Top Tags