public void ApplyParameterToAllElements(SharedParameterDefinition co2EParam) { var transaction = new Transaction(_activeUIDocument, "ApplyParameterToAllBuiltInCategories"); transaction.Start(); var definition = OpenDefinition(co2EParam.ParameterName, co2EParam.ParameterType, OpenGroup(co2EParam.GroupName, OpenSharedParamFile(co2EParam.SharedParametersFilename))); AttachCategoryToAllBuildInCategories(definition); transaction.Commit(); }