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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

tml3drenderer unhide a component


tml3drenderer unhide a component

In my project I could hide some component of the model and save into an array the hidden id, with: 


 var id_to_hide = $'-'+$[0];
  	console.log('id_to_hide: ',id_to_hide);
    tml3dRenderer.setProperties(id_to_hide,{hidden : true}); 

all is working fine. 


At the end of experience I want to restore all the component of the model, so I set up some code like this ad follow: 

$scope.clickReset = function() {
  	//funzione per ripristinare la posizione dei pezzi 
      console.log("entrato in if hide")
      for(j=0; j<$; j++){
          tml3dRenderer.setProperties($ ,{hidden : false}); 


When I push the reset button in chrome console appear: 

app-runtime.js:778 Error evaluating buttonReset click JS: clickReset();
(anonymous) @ app-runtime.js:778
$emit @ ionic.bundle.min.js:178
$scope.fireEvent @ app-runtime.js:456
(anonymous) @ app-runtime.js:473
n @ ionic.bundle.min.js:22
t @ ionic.bundle.min.js:22
a @ ionic.bundle.min.js:22
ionic.bundle.min.js:150 TypeError: name.split is not a function
    at Object.GetObject (twx-mobile-widgets-3d-ng.js:854)
    at Object.setProperties (twx-mobile-widgets-3d-ng.js:1968)
    at m.$scope.clickReset (app.js?v1604068793157:765)
    at fn (eval at compile (ionic.bundle.min.js:260), <anonymous>:4:221)
    at m.$eval (ionic.bundle.min.js:176)
    at app-runtime.js:773
    at m.$emit (ionic.bundle.min.js:178)
    at m.$scope.fireEvent (app-runtime.js:456)
    at HTMLButtonElement.<anonymous> (app-runtime.js:473)
    at n (ionic.bundle.min.js:22)


Anyone has some help?


some think like :

 for(j=0; j<$; j++){
          tml3dRenderer.setProperties($[j] ,{hidden : false}); 

I think it is array so you need the index, please, check 

but also possible to use the construct:

for(let iitem of ${
  tml3dRenderer.setProperties(item ,{hidden : false}); 
Top Tags