How to load the current entity object (Profile 2) Problem

I'm trying to load the current entity object, in this case a profile2, profile page.

I've been using 
Is there a way to load the current entity object?, to try and solve this. Where am I going wrong?

So Far

I have the following code running in a custom form inside a block. The block appears on the profile page.

function mymodule_form() {
    $node = menu_get_object('profile2', 1);
    dpm($node);
}


The path of my page is: localhost/drupal5/profile-main/154

I have two kinds of profile 2, machine names main and school, however the following doesn't work either.

$node = menu_get_object('main', 1);
I couldn't get menu_get_object to work with profile2 so instead I used a combination of profile2_load_by_user and arg suggested by Clive.

function mymodule_form() {
   //this arg gets the UID from the URL.
    $testarg = arg(1);

  //The UID is then put into a profile2 defined function which locates and opens the
  //correct profile.
    $currentprofile = profile2_load_by_user($testarg);
}