Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
viewstl giving id not found error even though the id is there

In the below code I use viewstl(https://www.viewstl.com/plugin/). but when I create a model with an id and I try to get the model information, I get the error get_model_info - id not found: 0. However, when I look at the stl log, it says the id under the model. Does anyone have an idea why this is happening?

let file = document.createElement('div');
file.setAttribute('id', 'stl_preview');
figure.insertBefore(file, figCap)
let stl = new StlViewer(document.getElementById('stl_preview'), {
    models: [{
        id:1, filename: reader.result
    }]
});
console.log(stl);
console.log(stl.get_model_info(0));

Or if anyone knows other stl viewers I can implement, I am open to suggestions.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Your id is 1 not 0, try this:

console.log(stl.get_model_info(1));
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!