# Iterative registration\_with\_scaling Error (3-Matic 16.0)

**URL:** <https://community.materialise.com/t/iterative-registration-with-scaling-error-3-matic-16-0/462>\
**Category:** MIS - Scripting Forum\
**Created:** [July 12, 2021, 9:14pm UTC](https://community.materialise.com/t/iterative-registration-with-scaling-error-3-matic-16-0/462 "2021-07-12T21:14:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![IAF2022](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@IAF2022](https://community.materialise.com/u/IAF2022)\
**Post date:** [July 12, 2021, 9:14pm UTC](https://community.materialise.com/t/iterative-registration-with-scaling-error-3-matic-16-0/462/1 "2021-07-12T21:14:30Z")

</div>

I’m attempting to automate the registration/scaling process of multiple parts for the creation of SSM using a similar method as in the Statistical shape model creation DemoFiles script (see first photo), but when I run it I encounter an error mentioning “pymatic”. Why does this error occur, and how can I prevent it from happening?  
 ![image1](https://canada1.discourse-cdn.com/flex035/uploads/materialiseacademy/original/1X/52c43ea366471e1ec8d5c6707b6651e641817ae3.jpeg)

The error in question:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/materialiseacademy/original/1X/5055a2524d863c92cbedeb769469d91ceb04b283.png)

Thank you in advance for you assistance.

---

<div class="post-metadata">

**Author:** ![Marnic](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@Marnic](https://community.materialise.com/u/Marnic)\
**Post date:** [July 13, 2021, 2:26pm UTC](https://community.materialise.com/t/iterative-registration-with-scaling-error-3-matic-16-0/462/2 "2021-07-13T14:26:24Z")

</div>

Hi Ian,

At first glance, it looks like your “i” is not a 3-matic part (STL) and this is causing the error. Can you confirm that all objects in your “dataset” are STL files?

Kind regards,

Marnic

---

<div class="post-metadata">

**Author:** ![IAF2022](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@IAF2022](https://community.materialise.com/u/IAF2022)\
**Post date:** [July 13, 2021, 4:12pm UTC](https://community.materialise.com/t/iterative-registration-with-scaling-error-3-matic-16-0/462/3 "2021-07-13T16:12:54Z")

</div>

Hi Marnic,

I appreciate you taking the time to help me out. I use a message box and a get\_selection() to identify the parts that go into the variable “dataset”. I just double checked and I get this error when all the objects in the “dataset” are of the type “\<trimatic.Part(part\_title)\>”. If this isn’t an STL, how do I convert it to an STL?

Sincerely,

Ian

---

<div class="post-metadata">

**Author:** ![Marnic](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@Marnic](https://community.materialise.com/u/Marnic)\
**Post date:** [July 14, 2021, 3:41pm UTC](https://community.materialise.com/t/iterative-registration-with-scaling-error-3-matic-16-0/462/5 "2021-07-14T15:41:34Z")

</div>

Hi Ian,

It might be best to reach out to your local support team (application engineer) so we can set up a quick webmeeting to have a look in more detail.

Kind regards,

Marnic

---

<div class="post-metadata">

**Author:** ![IAF2022](https://avatars.discourse-cdn.com/v4/letter/i/278dde/32.png) [@IAF2022](https://community.materialise.com/u/IAF2022)\
**Post date:** [July 15, 2021, 3:34pm UTC](https://community.materialise.com/t/iterative-registration-with-scaling-error-3-matic-16-0/462/6 "2021-07-15T15:34:03Z")

</div>

Error Solution:  
For some reason, the code that I wrote (pictured in the first pic above) only works if I specifically call the object within the variable, even if the variable only refers to one object (see new code pictured below). Does anyone know why it’s forcing me to do this when the DemoFiles scripts don’t?

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/materialiseacademy/original/1X/1c926b67d4132ceec65bbcb30ff882c0ffc1d482.png)  
This image depicts code that WILL work now.
