# Attribute error when trying to get transform between two coords

**URL:** <https://discourse.slicer.org/t/attribute-error-when-trying-to-get-transform-between-two-coords/28290>\
**Category:** Support\
**Created:** [March 10, 2023, 8:19pm UTC](https://discourse.slicer.org/t/attribute-error-when-trying-to-get-transform-between-two-coords/28290 "2023-03-10T20:19:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yshi](https://avatars.discourse-cdn.com/v4/letter/y/d2c977/32.png) [@yshi](https://discourse.slicer.org/u/yshi)\
**Post date:** [March 10, 2023, 8:19pm UTC](https://discourse.slicer.org/t/attribute-error-when-trying-to-get-transform-between-two-coords/28290/1 "2023-03-10T20:19:02Z")

</div>

Hello Slicer Community,

I created a simple plane P with 3 points and am hoping to get the transform between its coordinate system and the system default coord.  
 ![planeP](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/c/bc227e4913da0b7be74f4bbf5f3ce5e9f3b51630.png)

I tried this script:

> planeToWorld = vtk.vtkMatrix4x4()  
> getNode(‘P’).GetObjectToWorldMatrix(planeToWorld)  
> print(planeToWorld)

and got the error message saying “AttributeError: ‘vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsPla’ object has no attribute ‘GetObjectToWorldMatrix’”. Any advice would be greatly appreciated!

Operating system: Windows 11  
Slicer version: 4.11

Thanks,  
Yuan

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 11, 2023, 6:58am UTC](https://discourse.slicer.org/t/attribute-error-when-trying-to-get-transform-between-two-coords/28290/2 "2023-03-11T06:58:36Z")

</div>

Your Slicer version is several years old. It does not have the method you are looking for.

---

<div class="post-metadata">

**Author:** ![yshi](https://avatars.discourse-cdn.com/v4/letter/y/d2c977/32.png) [@yshi](https://discourse.slicer.org/u/yshi)\
**Post date:** [March 16, 2023, 12:24am UTC](https://discourse.slicer.org/t/attribute-error-when-trying-to-get-transform-between-two-coords/28290/3 "2023-03-16T00:24:20Z")

</div>

Thank you! I updated to v5.2.2 and the issue is solved.
