The measurement tool cannot be automated but there is a work around using parameters and relations.