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

Display sequence step names from Creo Illustrate

Highlighted
Regular Member

Display sequence step names from Creo Illustrate

This example briefly describes how you can use the Step names that you used in Creo Illustrate sequence definitions to drive a corresponding step instruction/description in your experience. This is an unsupported, preliminary solution - R&D is working on a better, final solution. But as long as this is not available, you can use this one for PoC and demo purposes.

To setup the scene: Here is what I meant with Step names that you used in Creo Illustrate:

StepDefInIllustarte.png

Now in Thingworx Studio you want to have the following result:

SequenceStepInView.png

The text is rendered with a simple Label widget. You'll have to remember the ID of this widget for the following javascript tweak. Add the following text to the Javascript section of your View:

var labelId = "label-1"; // ID of the Label widget that displays the Step progress and description  text

// this $on event handler switches the label based on the the sequence definition

// the arg variable is of the following form: (<step #>/<total step #) <step name>

$scope.$on('newStep', function(evt, arg) {

  $scope.setWidgetProp( labelId, "text", arg); // get the currentStep from the arg

});

Now you only need to provide the correct initial value in the Label widget text property and add control widgets (Buttons, Playback) to drive your animation and you're done.

Easy!

22 REPLIES 22

Re: Display sequence step names from Creo Illustrate

Thank you  Moritz von Hasselbach. The code works .

But  when Creo Illustrate step names inclsude Chinese character,In ThingWorx Studio preview, Chinese characters can not be displayed properly.

snapshot20170519092356.png

Re: Display sequence step names from Creo Illustrate

Hi Moritz,

How to write a Java script so that a label gets the description of a particular step only when it plays

Regards

Suresh

Re: Display sequence step names from Creo Illustrate

Hello Moritz,

this is great tutorial. Thank you much. I have two additional questions:

1/ Is possible to show only Step name?

2/ How to show Step description?

step_info.png

Thank you for your time.

Regards

Tomas

Re: Display sequence step names from Creo Illustrate

Hi Moritz,

As per the previous two comments, I'd also like to know if there is a way to extract out the step description.  If I follow your example, the label shows (<step #>/<total step #) <step name>:

Clipboard01.png

As Thomas showed in his previous post, in Creo Illustrate, you would type in detailed information in the notes tab which in the PVI file is stored as step_decription.

If found that in the sequence.js file in the project folder, the function SequenceStep(step) gets the following properties:

  • step_name
  • step_duration
  • step_acknowledge
  • step_description

And in the vuforia-angluar.js file, there's the definition of the newStepEventArgument that is set to (current step / total steps) step name.

So the question is, how to we extract out the information like step_description into the label text?

Many thanks,

Allan

Re: Display sequence step names from Creo Illustrate

Hi, Let me know if there are any chance to bring the step_description from Creo Illustrate

Regards,

Thadeus.D

Re: Display sequence step names from Creo Illustrate

Same request / goal here - would be nice to have the way to get the data from the steps' notes.

Re: Display sequence step names from Creo Illustrate

Thanks a lot

Re: Display sequence step names from Creo Illustrate

Hi Moritz,

Good day!

I would like to know, how to display only "step name" in my vuforia studio?

Currently it is showing like this "1/11 Step name". But what I want is only "Step name" to be seen.

 

Thank you!

 

Re: Display sequence step names from Creo Illustrate

Hey there, 

 

is there any new possibility to use the step notes in studio?