Skip to content

Commit

Permalink
DYN-5208-DynamoRevit-Crash-Fix Code Review 2
Browse files Browse the repository at this point in the history
Updating comment due that was specific to Revit.
  • Loading branch information
RobertGlobant20 committed Aug 29, 2022
1 parent b37dcc1 commit 2729c08
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ public override void Startup(ViewStartupParams viewStartupParams)

if (!string.IsNullOrEmpty(pathManager.HostApplicationDirectory))
{
//when running over Revit HostApplicationDirectory = C:\Program Files\Autodesk\Revit 2023\AddIns\DynamoForRevit\Revit
//Then we need to remove the Revit folder from the path so we can find the fallback_docs directory.
//when running over any host app like Revit, FormIt, Civil3D... the path to the fallback_docs can change.
//e.g. for Revit the variable HostApplicationDirectory = C:\Program Files\Autodesk\Revit 2023\AddIns\DynamoForRevit\Revit
//Then we need to remove the last folder from the path so we can find the fallback_docs directory.
var hostAppDirectory = Directory.GetParent(pathManager.HostApplicationDirectory).FullName;
var docsDir = new DirectoryInfo(Path.Combine(hostAppDirectory, FALLBACK_DOC_DIRECTORY_NAME));
fallbackDocPath = docsDir.Exists ? docsDir : null;
Expand Down

0 comments on commit 2729c08

Please sign in to comment.