This will work.
This is the easy way.
function findBrickByName(%name)
{
eval("%currentbrick = \"_\" @ %name;");
if(isObject(%currentBrick) && %currentBrick.getClassName() $= "fxDTSBrick")
{
return %currentbrick.getID();
}
else
{
return 0;
}
}
Keep in mind that this only looks for single named bricks so I'd appreciate it if somebody did it with Port's way.