<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can we show different steps in one sequence with different buttons? in Vuforia Studio</title>
    <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596486#M5200</link>
    <description>&lt;P&gt;Thanks for help!!!&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2019 11:32:15 GMT</pubDate>
    <dc:creator>Swapnil_More</dc:creator>
    <dc:date>2019-03-04T11:32:15Z</dc:date>
    <item>
      <title>How can we show different steps in one sequence with different buttons?</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596115#M5171</link>
      <description>&lt;P&gt;I want to play each different step (Contain in one Sequence)&amp;nbsp; with different button. Please find reference image for clarification.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 12:17:45 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596115#M5171</guid>
      <dc:creator>Swapnil_More</dc:creator>
      <dc:date>2019-02-28T12:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can we show different steps in one sequence with different buttons?</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596136#M5174</link>
      <description>&lt;P&gt;Hello Swapnil,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this forum, I found this thread about the same question :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.ptc.com/t5/Studio/Play-specific-step-of-PVI-sequence-at-studio/td-p/513858" target="_blank"&gt;https://community.ptc.com/t5/Studio/Play-specific-step-of-PVI-sequence-at-studio/td-p/513858&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is possible to reuse the same javascript function but with a step parameter :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be carreful, I didn' t check it and I am&amp;nbsp; sure if the step parameter is correctly copied to the function defined inside $timeout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$scope.playSequence = function (step) 
{
  $scope.$applyAsync(()=&amp;gt;{angular.element(document.getElementById('model-1')).scope().reset();});

  //delay of .5 sec to be sure that all action are done
  $timeout(function (step) {
             $scope.$applyAsync(()=&amp;gt;{$scope.setWidgetProp('model-1', 'currentStep', step);});
             //further delay for a 0.5 sec to be sure that the step is set and then play
             $timeout(function () {$scope.$root.$broadcast('app.view["Home"].wdg["model-1"].svc.play'); }, 500);
            }, 500);
};&lt;/PRE&gt;
&lt;P&gt;After that, it is possible to call this function in each button and use right step in the click event by:&lt;/P&gt;
&lt;PRE&gt;playSequence(1);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Samuel&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 13:18:53 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596136#M5174</guid>
      <dc:creator>sdidier</dc:creator>
      <dc:date>2019-02-28T13:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can we show different steps in one sequence with different buttons?</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596232#M5182</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;I tried this one but can i show steps in select widget, if i select dropdown i want all steps in that dropdown.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please find below image.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/235457"&gt;@sdidier&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello Swapnil,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this forum, I found this thread about the same question :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.ptc.com/t5/Studio/Play-specific-step-of-PVI-sequence-at-studio/td-p/513858" target="_blank" rel="noopener"&gt;https://community.ptc.com/t5/Studio/Play-specific-step-of-PVI-sequence-at-studio/td-p/513858&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is possible to reuse the same javascript function but with a step parameter :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be carreful, I didn' t check it and I am&amp;nbsp; sure if the step parameter is correctly copied to the function defined inside $timeout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$scope.playSequence = function (step) 
{
  $scope.$applyAsync(()=&amp;gt;{angular.element(document.getElementById('model-1')).scope().reset();});

  //delay of .5 sec to be sure that all action are done
  $timeout(function (step) {
             $scope.$applyAsync(()=&amp;gt;{$scope.setWidgetProp('model-1', 'currentStep', step);});
             //further delay for a 0.5 sec to be sure that the step is set and then play
             $timeout(function () {$scope.$root.$broadcast('app.view["Home"].wdg["model-1"].svc.play'); }, 500);
            }, 500);
};&lt;/PRE&gt;
&lt;P&gt;After that, it is possible to call this function in each button and use right step in the click event by:&lt;/P&gt;
&lt;PRE&gt;playSequence(1);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Samuel&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 06:15:41 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596232#M5182</guid>
      <dc:creator>Swapnil_More</dc:creator>
      <dc:date>2019-03-01T06:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: How can we show different steps in one sequence with different buttons?</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596445#M5193</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/292490"&gt;@Swapnil_More&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so far, I see you want to have&amp;nbsp;list of all steps.&lt;/P&gt;
&lt;P&gt;If you have such&amp;nbsp;list is then is no problem ... but first you need to generate the list and there is no way to get it directly from the model widget.&lt;/P&gt;
&lt;P&gt;Here more info about the problem in this post "&lt;A href="https://community.ptc.com/t5/Studio/Retrieve-sequence-stepname-by-index/m-p/588370" target="_blank"&gt;&amp;nbsp;Retrieve sequence stepname by index&lt;/A&gt;"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also another way is to extract all steps is possible when you use the sequence definition file&amp;nbsp; -&amp;gt; from the *.pvi file . It is a xml format and using some tools/ public xml libraries&amp;nbsp;you can easy&amp;nbsp; extract the properties&amp;nbsp; with name and value...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-04_10-06-31.gif" style="width: 548px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/14688i28206303296D38B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-04_10-06-31.gif" alt="2019-03-04_10-06-31.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 09:18:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596445#M5193</guid>
      <dc:creator>RolandRaytchev</dc:creator>
      <dc:date>2019-03-04T09:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can we show different steps in one sequence with different buttons?</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596465#M5197</link>
      <description>&lt;P&gt;Hi @&lt;SPAN&gt;RolandRaytchev,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I want dropdown with each &amp;amp; every step. If I click on Dropdown menu it should have to show all steps include in that sequence, after that if I click on each step, It should have to play that specific steps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is it possible to do?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 09:46:46 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596465#M5197</guid>
      <dc:creator>Swapnil_More</dc:creator>
      <dc:date>2019-03-04T09:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can we show different steps in one sequence with different buttons?</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596470#M5198</link>
      <description>&lt;P&gt;Yes , this is possible, but&lt;/P&gt;
&lt;P&gt;as described in my previous post you need to have the list of sequences and steps.&lt;/P&gt;
&lt;P&gt;- so 1.) you need to extract the info /the list&amp;nbsp; (how to do this , please, see my previous post)&lt;/P&gt;
&lt;P&gt;2.) so when you have an info like sequence name, and step number (that what was extracted for example from PVI file)&lt;/P&gt;
&lt;P&gt;You can set the particular sequence (if there are many) and set the step - via the step number (as mention by&amp;nbsp;&amp;nbsp; ).. and play -- this we can do ... but , please, read more detailed all post's to this thread&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 10:07:30 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596470#M5198</guid>
      <dc:creator>RolandRaytchev</dc:creator>
      <dc:date>2019-03-04T10:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can we show different steps in one sequence with different buttons?</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596486#M5200</link>
      <description>&lt;P&gt;Thanks for help!!!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 11:32:15 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596486#M5200</guid>
      <dc:creator>Swapnil_More</dc:creator>
      <dc:date>2019-03-04T11:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can we show different steps in one sequence with different buttons?</title>
      <link>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596550#M5206</link>
      <description>&lt;P&gt;Back to this statement:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"2.) so when you have an info like sequence name, and step number (that what was extracted for example from PVI file)"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-&amp;gt; you can use some code like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;$scope.app.playModelStep_call_count=0; 

$rootScope.$on('modelLoaded', function() 
 {
$scope.app.playModelStep_call_count=0;
 
console.log("modelLoaded complete")
                
               })
//definition of the function
$scope.app.playModelStep = function (sequence,modelName,step_number, reset,play) {
//sequnece -sequnece name e.g. TestFigure1 - as shown in UI
//modelName - model name e.g. model-1
//step_number - set this number to current step
//reset  true/false execture reset for the model
//play   true/false execute play for the model

if(reset)  //check if reset should be applyed
{  console.log("$scope.app.playModelStep_call_count="+$scope.app.playModelStep_call_count);
if($scope.app.playModelStep_call_count !=0) //first time is reset srv not defined and will cause an exception
  $scope.$applyAsync(()=&amp;gt;{angular.element(document.getElementById(modelName)).scope().reset();});
}
  $scope.app.playModelStep_call_count++;
$scope.$applyAsync(()=&amp;gt;{$scope.setWidgetProp(modelName, 'sequence',  '');});


  $timeout(function () {
  $scope.$applyAsync(()=&amp;gt;{$scope.setWidgetProp(modelName, 'sequence',  'app/resources/Uploaded/l-Creo 3D - '+sequence +'.pvi');});
 // $timeout(function () {$scope.$root.$broadcast('app.view["Home"].wdg['+modelName+'].svc.reset'); }, 200);  
    
  },50);
 
  $timeout(function () {
     
  $scope.$applyAsync(()=&amp;gt;{$scope.setWidgetProp(modelName, 'currentStep', parseInt(step_number));});
  
 if(play)   //check if play should be applyed
  
 $timeout(function () {angular.element(document.getElementById(modelName)).scope().play(); }, 100);
                      }, 100);
 
};
//////////////////////////////////&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;So it should looks in preview like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-03-04_16-59-25.gif" style="width: 457px;"&gt;&lt;img src="https://www.ptcusercommunity.com/t5/image/serverpage/image-id/14705iFFE4891D3FB9FAAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-03-04_16-59-25.gif" alt="2019-03-04_16-59-25.gif" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 16:06:16 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Vuforia-Studio/How-can-we-show-different-steps-in-one-sequence-with-different/m-p/596550#M5206</guid>
      <dc:creator>RolandRaytchev</dc:creator>
      <dc:date>2019-03-04T16:06:16Z</dc:date>
    </item>
  </channel>
</rss>

