Resolve relative Additional Render Appearance Paths

Resolve relative Additional Render Appearance Paths

pieter7
Advisor Advisor
549 Views
0 Replies
Message 1 of 1

Resolve relative Additional Render Appearance Paths

pieter7
Advisor
Advisor

I am building a plugin that lets you manage all texture files loaded into the project.

 

Revit saves these paths in various ways. Some paths are saved as absolute paths, but when a path is relative or broken, Revit also checks in a number of user-defined folders (so called "additional render appearance paths", saved in the Revit.ini).

 

I've successfully extracted these paths from the Revit.ini, but am realizing they are saved as a relative path. For example, this is how that line in my Revit ini looks:

AdditionalRenderAppearancePaths=..\..\..\Users\PSCHIETTECATTE\Desktop\test folder1\|..\..\..\Users\PSCHIETTECATTE\Desktop\test folder2\|..\..\..\temp\

 

The paths seem to be relative to the Revit.exe.

 

Does anyone know of a reliable way to convert these to absolute paths. Would I need to read the registry for the Revit.exe location? Or is there a simpler way?

 

0 Likes
550 Views
0 Replies
Replies (0)