Thanks for the feedback!
I suppose when looking for materials to replace I would only really need to look in scene materials but for the materials that are coming in to replace those, ideally I'd want them to be from a .mat file on my computer.
Yes I'd want to look for sub materials because I think any multi/sub-object material shouldn't need to change at all, since it retains the correct material->geometry mapping I'd want to leave that alone completely and only swap out the sub-materials.
Regarding class I'm not sure I know all the technical parts of that but would be looking for only materials, not textures or maps, and from revit I think it's almost always an 'autodesk material' and from sketchup it's a 'standard material'.
After thinking more about this though I'm not as sure the searching/wildcard aspect of this is as necessary. A simpler version (I think) would be to just use the full name of the material you want to replace and swap it for the material you want to substitute in. Is that possible/easier to facilitate? This would mean I couldn't make a generic script that work with a lot of scenes but instead would write up a script for each project that replaces its specific materials with ones from my library and when I need to re-import because something changed back in revit or sketchup I can run the script on it again.
This would make it a lot more of a 1 to 1 with my manual example in my former post as I think you could do something along the lines of:
sceneMaterials["Multi/Sub _01"].material[2] = sceneMaterials["Material_A"]
Which I figured out using macro recorder, however, this only seems to work for sub-materials and the macro recorder provides no feedback when you're just replacing one scene material with another.
My big hurdle now is I can't figure out the syntax for just replacing a material with another, seems like a basic thing but I can't find it anywhere. Does anyone here know what that would be? Just looking for something that would be one or two lines of code like above but not operate on sub-materials.