Reading a Textures Material Path not returning full path

Hey there i am facing an issue in Dynamo for Revit in 2023 and 2025 when reading a materials texture path it will only return the file name rather then the full path.

I have written my own cpython3 node and also get returned withe same issue.
I have used Genius Locis Find Texture Path node to do this and i am returned with same issue.
Please see the image below.

Heres the code.

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument
materials_input = UnwrapElement(IN[0])
materials = materials_input if isinstance(materials_input, list) else [materials_input]

def get_material_texture_paths(material):
    paths = []
    # Check if material has appearance asset
    if hasattr(material, 'AppearanceAssetId'):
        assetElem = doc.GetElement(material.AppearanceAssetId)
        if assetElem:
            # Use the appearance asset edit scope
            with Visual.AppearanceAssetEditScope(doc) as editScope:
                asset = editScope.Start(assetElem.Id)
                # Iterate through all properties in the asset
                for idx in range(0, asset.Size):
                    property = asset.Get(idx)
                    connectedAsset = property.GetSingleConnectedAsset()
                    # Check if there is a connected asset
                    if connectedAsset:
                        # Extract paths based on schema type
                        if connectedAsset.Name == "UnifiedBitmapSchema":
                            bitmap_property = connectedAsset.FindByName("unifiedbitmap_Bitmap")
                            if bitmap_property:
                                paths.append(bitmap_property.Value)
                        elif connectedAsset.Name == "BumpMapSchema":
                            bitmap_property = connectedAsset.FindByName("bumpmap_Bitmap")
                            if bitmap_property:
                                paths.append(bitmap_property.Value)
    paths = list(filter(None, paths))
    return paths[0] if len(paths) == 1 else paths if paths else None

all_results = []
for mat in materials:
    result = get_material_texture_paths(mat)
    all_results.append(result)

OUT = all_results

The OOTB dynamo node AppearanceAssetElement.GetRenderingAssetTextureImages doesnt work either

Does anyone have any insight on how to read the full path rather then just the file name.
If you hover over the materials image in the Material menu in revit it shows the full path of the image so revit has to be storing it somewhere right?

1 Like

Material asset paths are relative - so the default path is C:\Program Files\Common Files\Autodesk Shared\Materials\Textures

If you have custom textures it will most likely include the full path - see example below
image

Thanks for a response these materials texture paths are currently living in a different directory than the default autodesk material directory. Which is why i’d expect a response similar to the node you are showing. Which node do you happen to be using to get that response?

There isn’t a path to it as your system has been told where it lives, so Revit, you, and anyone else in your environment (such as your co workers) should know what that directory is.

The source code could be modified to search all material directories + the file name until it is returned, but that would slow stuff down quite a bit for 99% of the use cases where this step isn’t needed. Since you’ve got a unique case, you’ll have to write the code solution yourself.

I believe there is a method to read the relative path directories available - I recommend you start with.this method: Revit API 2026 Documentation

So I’ve attempted getting the relative path directories via your recommended method. However it returns a path that doesn’t exist on my machine when viewing it in windows explorer i have admin rights to check it as well.

I’m curious there must be a property/field that i can access as hovering over the path in the material editor reveals the full path.

Looks like you may have to read your Revit ini directly (info), or find mother method for accessing those directories.