I’m trying to bring some old-ish (2017 last updated, feels like yesterday) C# Code we have back to life in pyrevit.
I’m sure this is going to be an easy one for anyone with good .net knowledge, unfortunately my skill Set with C# and .net generally is pretty poor, but I can just about navigate a script.
I’m stuck on the following error:
error CS0103: The name 'DocUtils' does not exist in the current context (x3 similar)
I’ve tried loading the Utils files into my normal pyRevit Lib folder, and also as a subfolder of the main .pushbutton folder but no luck. am I barking up the wrong tree/ missing something easy here? or do .net scripts need to be self-contained to execute in pyRevit?
Made some progress, one of my methods is causing an error but I’ll make a separate post for that.
Originally I was trying to add a reference to a shared project. Turns out I needed to add a bundle.yaml in the pushbutton folder as well as put the referenced files inside of a bin folder. The other issue was that you need a dll file, I was trying to use a cs file. Shared projects are compiled within their referenced project, not on their own, so I couldn’t add a dll of the shared project but adding the dll of the project that referenced it worked just fine.