If you have the samples loaded in the Task Pane of the layout in the browser the Measure command is called. You need to make the same calls, but depending on which layout type you are using you will have to fight with frames. From the Site Explorer in Studio open Samples\Sheboygan\Layouts\SheboyganXXX depending on which language you installed. Prevew the layout and in the Right Task Pane click the Tasks button and select Measure. This shows a coding example.
Regards,
Dave