Showing results for 
Search instead for 
Did you mean: 

Testing the validity of a path


Hi All,


I import a string table from excel with a list of existing path. (for example .root.buffer3)

Except for few of them, which are pointing to the .cont of a buffer (for example .root.buffer4.cont).

In fact, I use a crane to move entities from a place to another, and sometimes the entities are on a transporter, himself on a buffer. (that's why I need to adress the .root.buffer.cont to pick up the part with the crane)

My problem is that i need to be sure that the entity is present on the transporter, himself on the buffer, at the moment where the method is launched, in order to not send the crane without anything to pick up.

That's why I would like to test if the .root.buffer4.cont is a valid path.

The main problem is that, I need to pick the name of the path in the table et to change it into an object.

For example, when there is no transporter on it, and that I do 


if str_to_obj(root.table[2,3]) /= VOID then....


where the root.table[2,3] adress to the .cont (which don't exist) of an existing path, I have a message error which explain me that root.table[2,3] is not a valid path.

But, that's not really a problem for me and I just need to know it before...


How to test it before without create an error message ?



Re: Testing the validity of a path

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Hi Flo_M,


You could try the method "existsObject()", use the path you want to check as argument (string).



Gert Nomden

Gert Nomden
Digital Factory Consultant

Re: Testing the validity of a path


Thanks !

Exactly what I needed !