public Result Execute(
ExternalCommandData commandData,
ref string message,
ElementSet elements)
{
Application app = commandData.Application.Application;
string reg_path_product
= RegPathForFlavour(
app.Product, app.VersionNumber );
string product_code
= GetRevitProductCode( reg_path_product );
string install_location
= GetRevitInstallLocation( product_code );
string msg = FormatData(
"Running application",
app.VersionName,
product_code,
install_location );
foreach( ProductType p in
Enum.GetValues( typeof( ProductType ) ) )
{
try
{
reg_path_product = RegPathForFlavour(
p, app.VersionNumber );
product_code = GetRevitProductCode(
reg_path_product );
install_location = GetRevitInstallLocation(
product_code );
msg += FormatData(
"\n\nInstalled product",
p.ToString(),
product_code,
install_location );
}
catch( Exception )
{
}
}
Util.InfoMsg( msg );
return Result.Failed;
}