-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for loading ASM from RSA install location #9884
Conversation
@@ -14,7 +14,7 @@ public static class Utilities | |||
/// <summary> | |||
/// Key words for Products containing ASM binaries | |||
/// </summary> | |||
private static readonly List<string> ProductsWithASM = new List<string>() { "Revit", "Civil", "FormIt" }; | |||
private static readonly List<string> ProductsWithASM = new List<string>() { "Revit", "Civil", "Robot Structural Analysis", "FormIt" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASM from RSA will be used if there is no Revit or Civil3D installed on the user's machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot if changing the order here affect the ASM paths found?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it does. See:
foreach (KeyValuePair<string, Tuple<int, int, int, int>> install in installations) |
We first iterate over the different LibG versions and then over the supported products list and whichever matches first, comes out the winner. So it does matter if we play with the order. For example if Revit and RSA are both installed, and there is a match, ASM will be loaded from Revit and if we swap Revit with RSA, ASM will be loaded from RSA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is refreshing to me. Keeping the order of Revit first looks safe.
@@ -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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aparajit-pratap Did you notice any noticeable slow down with such searching option with RSA?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't notice any difference as I don't suspect there is a noticeable slowdown if any after this change. In any case, I think this part of the fix might be unavoidable due to the fact that there is no guarantee that ASM will always be found in the root directory of an installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aparajit-pratap Thank you, sounds reasonable here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @QilongTang for the review. Does this need to be cherry-picked into 2.4? |
* support for loading ASM from RSA install location * cleanup
* support for loading ASM from RSA install location * cleanup
This reverts commit 7813b83.
* Add support for loading ASM from RSA install location (#9884) * support for loading ASM from RSA install location * cleanup * correction
Purpose
JIRA: https://jira.autodesk.com/browse/DYN-2047
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@QilongTang @mjkkirschner