This only works if the device descriptions permit removing of that particular device - on other words, if you can delete it using the UI in the same situation.
For Slots, you can call the unplug() method.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Also, is there a way to move module in device tree up or down, using script?
My devices tree looks like this:
- CIFX_PB
- UR20_FBC_PB_DP
- UR20_8DO_P
- UR20_4DO_P
dev = proj.find("UR20_FBC_PB_DP", True)
obj = proj.find("UR20_4DO_P", True)
obj[0].move(dev[0],0)
but in response I have error: "This device cannot be added or inserted here"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-08-17
Originally created by: M.Schaber
Hi, Daniel,
daniel_REC hat geschrieben:
Also, is there a way to move module in device tree up or down, using script?
My devices tree looks like this:
- CIFX_PB
- UR20_FBC_PB_DP
- UR20_8DO_P
- UR20_4DO_P
I was trying to run script:
proj = projects.primary
app = proj.active_application
onlineapp = online.create_online_application(app)
dev = proj.find("UR20_FBC_PB_DP", True)
obj = proj.find("UR20_4DO_P", True)
obj[0].move(dev[0],0)
but in response I have error: "This device cannot be added or inserted here"
If the device descriptions allow that movement, and the indices are set correctly, it should work that way. Actually, I did experiment a little bit, and it worked on my side.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
Does someone know how to delete particular device from project list using script?
Originally created by: M.Schaber
Hi, Daniel,
This only works if the device descriptions permit removing of that particular device - on other words, if you can delete it using the UI in the same situation.
For Slots, you can call the unplug() method.
Thank You,
Also, is there a way to move module in device tree up or down, using script?
My devices tree looks like this:
- CIFX_PB
- UR20_FBC_PB_DP
- UR20_8DO_P
- UR20_4DO_P
I was trying to run script:
proj = projects.primary
app = proj.active_application
onlineapp = online.create_online_application(app)
dev = proj.find("UR20_FBC_PB_DP", True)
obj = proj.find("UR20_4DO_P", True)
obj[0].move(dev[0],0)
but in response I have error: "This device cannot be added or inserted here"
Originally created by: M.Schaber
Hi, Daniel,
If the device descriptions allow that movement, and the indices are set correctly, it should work that way. Actually, I did experiment a little bit, and it worked on my side.