RoboDK Forum
Get the parts name of a splitted 3D object可打印版本

+- RoboDK Forum (//m.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//m.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: Get the parts name of a splitted 3D object (/Thread-Get-the-parts-name-of-a-splitted-3D-object)



Get the parts name of a splitted 3D object-Yohan Lemarchandel-08-12-2021

Hi everyone,

When we split a 3D object we get the same name with a number at the end of each splitted part.
I would like to know if it's possible to get the original parts name of a splitted 3D object? This would be useful for me in order to be able to manipulate the parts with the API.

Thanks,
Yohan


RE: Get the parts name of a splitted 3D object-Albert-08-12-2021

嗨,Yohan,

It is not possible to get the original file path from an object component, but you can get the parent item in the tree using something like this:
Code:
part_parent = part.Parent()
if part_parent == object:
print("The part parent is the object")
Albert