Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Change item's type in a python script

#1
Hi,

Is it possible to change an item's type in a python script ?
I have a tool I am importing with SolidWorks plugin and when I drag and drop it to my robot its type is changed from object to tool, but when I import it and set its parent as a robot with a script, its type stays object.

What can I do to change its type at the same time I change its parent ?

Thanks,
Camille
#2
Hi Camille,

Did you follow these instructions?
https://robodk.com/doc/en/PythonAPI/robo...nk.AddFile

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#3
Hi Jeremy,

I considered this option but the application I have requires the user to import a tool, a part and a curve from SolidWorks right now.
So I would prefer to avoid using two different importing settings for the user.

If there is no other choice, I will use this way, but I wanted to check before.

Thanks,
Camille
#4
Hi Camille,

Can you update RDK to the latest version, I think that with the newest version the object should automatically become a tool when you set a robot as a parent. Can you confirm?
Otherwise, we will look into it.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#5
Unfortunately it did not work.

Camille
#6
Ok, we'll keep you updated.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#7
Hi Jeremy,

I think I figured it out, I used this line instead :

 
Code:
objet = robot.AddTool(nPose,nomObjet)

and it looks like it worked !

Camille
  




Users browsing this thread:
1 Guest(s)