Show sequence step number on 3D label
- April 16, 2019
- 2 replies
- 4999 views
Hello,
How can I create logic to grab the currentStep of a sequence, subtract 1 and then bind it to a 3D label?
Each time I try this code (below), I get this error
"TypeError: Cannot read property 'currentStep' of ionic.bundle.min.js:150 undefined"
/// Indicate Numbers on Buttons
if($scope.app.view.Home.wdg.pump.currentStep === 'defined')
{
var p = $scope.app.view.Home.wdg.pump.currentStep+1;
var n = $scope.app.view.Home.wdg.pump.currentStep-1;
$scope.app.view.Home.wdg.prevNumber.text = p.toString();
$scope.app.view.Home.wdg.nextNumber.text = n.toString();
}
The model is "pump"
The Studio ID of the 3D labels are prevNumber & nextNumber (to indicate the steps before and after the current step). Please see attached image too.
[currentStep] I think is a number, and wdg.[3D label].text must be a string so this is why I'm trying to use "toString()"
Any ideas would be appreciated. Thanks so much!
-Wes


