From 35e1360e4670a4894782c05b0706ded007335628 Mon Sep 17 00:00:00 2001 From: aparajit-pratap Date: Wed, 7 Aug 2019 13:35:35 -0400 Subject: [PATCH] Add support for loading ASM from RSA install location (#9884) (#9886) * support for loading ASM from RSA install location * cleanup --- src/Tools/DynamoInstallDetective/ProductLookUp.cs | 6 +++--- src/Tools/DynamoShapeManager/Utilities.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tools/DynamoInstallDetective/ProductLookUp.cs b/src/Tools/DynamoInstallDetective/ProductLookUp.cs index ef18245be36..af2f29d4037 100644 --- a/src/Tools/DynamoInstallDetective/ProductLookUp.cs +++ b/src/Tools/DynamoInstallDetective/ProductLookUp.cs @@ -159,7 +159,7 @@ static string GetDisplayName(RegistryKey key) public InstalledProductLookUp(string lookUpName, string fileLookup) { this.ProductLookUpName = lookUpName; - this.fileLocator = (path) => Directory.GetFiles(path, fileLookup).FirstOrDefault(); + this.fileLocator = (path) => Directory.GetFiles(path, fileLookup, SearchOption.AllDirectories).FirstOrDefault(); } public InstalledProductLookUp(string lookUpName, Func fileLocator) @@ -254,8 +254,8 @@ class InstalledProduct : IInstalledProduct public InstalledProduct(string installLocation, InstalledProductLookUp lookUp) { - InstallLocation = installLocation; - var corePath = lookUp.GetCoreFilePathFromInstallation(InstallLocation); + var corePath = lookUp.GetCoreFilePathFromInstallation(installLocation); + InstallLocation = Path.GetDirectoryName(corePath); VersionInfo = lookUp.GetVersionInfoFromFile(corePath); ProductName = string.Format("{0} {1}.{2}", lookUp.ProductLookUpName, VersionInfo.Item1, VersionInfo.Item2); VersionString = string.Format("{0}.{1}.{2}.{3}", VersionInfo.Item1, VersionInfo.Item2, VersionInfo.Item3, VersionInfo.Item4); diff --git a/src/Tools/DynamoShapeManager/Utilities.cs b/src/Tools/DynamoShapeManager/Utilities.cs index da72dffa409..d10733ce465 100644 --- a/src/Tools/DynamoShapeManager/Utilities.cs +++ b/src/Tools/DynamoShapeManager/Utilities.cs @@ -14,7 +14,7 @@ public static class Utilities /// /// Key words for Products containing ASM binaries /// - private static readonly List ProductsWithASM = new List() { "Revit", "Civil", "FormIt" }; + private static readonly List ProductsWithASM = new List() { "Revit", "Civil", "Robot Structural Analysis", "FormIt" }; #region public properties public static readonly string GeometryFactoryAssembly = "LibG.ProtoInterface.dll";