I have a question about isDefined() method in the custom URCap node.
I have found this method is called at the following times.
Open the program file that has custom URCap node
Exit the program screen
Move the scroll bar in program screen
Execute the program that has custom URCap node
Select the custom URCap node
Change the setting of custom URCap node
For that reason, when I build the program that has many URCap node and execute it, isDefined() is called for the number of nodes.
And this has caused the robot to take long time to start moving.
I used this method to determine if other nodes are in the right place, but there is no reason to explore child nodes when executing.
Is there any way to switch process in isDefined() between when editing program and when executing program ?
In order for the method to function correctly on a Parent node, it has to check all the children nodes, as if any of them are undefined, so is the parent. So no, I don’t think there’s any way to alter this behavior.
I know it is inevitable that the function is called when I start the program.
I would like to implement as below in order to do something only when I editing program, not on executing if it is possible.
@Override
public boolean isDefined() {
if ( // detect whether if the user editng the program ) {
// ...
}
}
Does anyone have a good idea to judge whether if the user is editing the program, or executing the program ?
Thank you.