evaluation proc problem


#1

Hi,
I am having this problem,and can´t see what is wrong.
I declare a proc and then try to evaluate it under a condition,but it doesn´t work.
Here is the code



//make locator
spaceLocator -n "myLoc";

//declare proc
global proc box()
{
polyCube;
};

string $myProc="box";

//evaluate proc if loc exists

if (`exists myLoc`)
{
eval box;
}
;

thx


#2

you are using the wrong command - use “objExists” instead “exists” - this will do the job. Read the docs for further information.


#3

:bounce:ok!thank you.


#4

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.