Parts function (auto-generate measure and part attrs)