Add support for loading ASM from RSA install location#9884
Add support for loading ASM from RSA install location#9884aparajit-pratap merged 2 commits intoDynamoDS:masterfrom
Conversation
| /// 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.
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.
I forgot if changing the order here affect the ASM paths found?
There was a problem hiding this comment.
Yes, it does. See:
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.
Thanks, this is refreshing to me. Keeping the order of Revit first looks safe.
| { | ||
| 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.
@aparajit-pratap Did you notice any noticeable slow down with such searching option with RSA?
There was a problem hiding this comment.
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.
@aparajit-pratap Thank you, sounds reasonable here.
|
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
*.resxfilesReviewers
@QilongTang @mjkkirschner