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

Pass the Preferences as part of the Initializacion configuration #2933

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion src/DynamoRevit/DynamoRevit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,8 @@ private static RevitDynamoModel InitializeCoreModel(DynamoRevitCommandData comma
AuthProvider = new RevitOAuth2Provider(new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher)),
ExternalCommandData = commandData,
UpdateManager = revitUpdateManager,
ProcessMode = isAutomationMode ? TaskProcessMode.Synchronous : TaskProcessMode.Asynchronous
ProcessMode = isAutomationMode ? TaskProcessMode.Synchronous : TaskProcessMode.Asynchronous,
Preferences = PreferenceSettings.Instance
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to pass the PathResolver?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we need to pass the PathResolver?

yes as the previously been doing in the startconfiguration, now We assigning it to the PathManager in the DynamoModel ctor, the only update is need to pass the Preferences.

});
}

Expand Down
3 changes: 2 additions & 1 deletion test/Libraries/RevitTestServices/RevitSystemTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ protected override void StartDynamo(TestSessionConfiguration testConfig)
SchedulerThread = new TestSchedulerThread(),
PackageManagerAddress = "https://www.dynamopackages.com",
ExternalCommandData = commandData,
ProcessMode = RevitTaskProcessMode
ProcessMode = RevitTaskProcessMode,
Preferences = PreferenceSettings.Instance
Copy link
Member

Choose a reason for hiding this comment

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

have you tried running all RTF tests locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

have you tried running all RTF tests locally?

I have tried but even when I put the paths and the proper tests it got me errors, I have tested with some Dynamo flows under the DynamoRevit pointing to DynamoCore 4.8

});

Model = DynamoRevit.RevitDynamoModel;
Expand Down