Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Hi All,
I usually use the following code for making appear and disappear the widgets in a specific step in sequence:
$scope.$on('newStep', function() {
switch($scope.view.wdg['model-3']['currentStep']) {
case 3:
$scope.setWidgetProp( "Warning", "text", 'Note: Only for T200 & T600 Series');
break;
}
});
However, this time in model-3 I have three different sequences and not just one. With this code, the widgets appear in all the sequences. What can I add to specify the sequence?
Thank you!
May be you can try some thing like:
$scope.$on('newStep', function() {
if($scope.view.wdg['model-3']['sequence'] == 'app/resources/Uploaded/l-Creo 3D - fig_5F1.pvi')
//go to switch construct only if model wdiget has sequence fig_5F1
switch($scope.view.wdg['model-3']['currentStep']) {
case 3:
$scope.setWidgetProp( "Warning", "text", 'Note: Only for T200 & T600 Series');
break;
}
});
So means you will execute the switch statement only if the model widget sequence property == fig_5F1
for the compression statement , may be , is better to compare only a string is practically contained by the sequence
something like e.g. using indexOf like:
if($scope.view.wdg['model-3']['sequence'].indexOf("Figure 1") != -1)
//go to switch construct only if model wdiget has sequence Figure 1
switch($scope.view.wdg['model-3']['currentStep']) {
....
Thank you so much! It worked great!