Python Api

Python Api

cool.stuff
Collaborator Collaborator
5,471 Views
20 Replies
Message 1 of 21

Python Api

cool.stuff
Collaborator
Collaborator

Good morning!!!

 

When I try to define a support in Python with the follwoing code,

 

sup = labels.Create(rp.IRobotLabelType.I_LT_SUPPORT, 'sup')
sup_dt=rp.IRobotNodeSupportData
sup_dt = sup.Data
sup_dt.UX = 1
sup_dt.UY = 1
sup_dt.UZ = 1
sup_dt.RX = 1
sup_dt.RY = 1
sup_dt.RZ = 1
labels.Store(sup)

 

I got the error:

 


File "<ipython-input-56-8cf91e21e0e8>", line 1, in <module>
sup_dt = sup.Data

AttributeError: '__ComObject' object has no attribute 'Data'

 

Can someone help me?

Thanks

 

0 Likes
Accepted solutions (1)
5,472 Views
20 Replies
Replies (20)
Message 21 of 21

ArunNDinesh
Enthusiast
Enthusiast

@JacquesGaudin Yes! It works and prints the remaining lines. 

Also cleared the error in this line by replacing "RobotOM" with "rbt" , it ran the code and created the support as intended.  Thanks a lot for your support😊 Kudos

sup = IRobotLabel(labels.Create(rbt.IRobotLabelType.I_LT_SUPPORT, 'Sup'))

 

0 Likes