Skip to content
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

DYN-7409: Properly use the userData CLI parameter #15558

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/DynamoApplications/StartupUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,16 @@ public static void PreloadShapeManager(ref string geometryFactoryPath, ref strin
public static DynamoModel MakeCLIModel(CommandLineArguments cmdLineArgs)
{
var asmPath = String.IsNullOrEmpty(cmdLineArgs.ASMPath) ? string.Empty : cmdLineArgs.ASMPath;
IPathResolver pathResolver = CreatePathResolver(false, string.Empty, string.Empty, string.Empty);

IPathResolver pathResolver = CreatePathResolver(true, string.Empty, cmdLineArgs.UserDataFolder, cmdLineArgs.CommonDataFolder);
PathManager.Instance.AssignHostPathAndIPathResolver(string.Empty, pathResolver);

if (!File.Exists(PathManager.Instance.PreferenceFilePath))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this traverse the newly set user data folder from the command line args and check for a prefs file there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. If userData parameter is, e.g. %appData%\Dynamo\Dynamo Revit, PathManager.Instance.PreferenceFilePath is %appData%\Dynamo\Dynamo Revit\3.4\DynamoSettings.xml.

{
pathResolver = CreatePathResolver(true, string.Empty, string.Empty, cmdLineArgs.CommonDataFolder);
PathManager.Instance.AssignHostPathAndIPathResolver(string.Empty, pathResolver);
}

DynamoModel.SetUICulture(PreferenceSettings.Instance.Locale);
DynamoModel.OnDetectLanguage();

Expand Down
Loading