I’m trying to integrate the lexactivator.cs filein my C# project. This works great when I test it in visual studio. Eventually my C# project will be part of a project in 3dsMax (3d modeling software which implements .net) which in turn uses these libraries to perform tasks. Due to the way 3dsMax reads the c# libraries I’m unable to use hardcoded or relative filepaths to locate libraries. I need to specify the full filepath to the libraries.
This is an issue with the LexActivator class I need to include as it contains two path to dll’s: LexActivator.dll and LexActivator64.dll. These paths are constants, which means I can’t change them at runtime. If I turn them into static values I get a bunch of errors because these paths are used in attributes, which only accept constants. I’m at a loss how to proceed. Are you able to help me modify your library in such a way that I can specify the paths to the two dll’s at runtime for instance in a constructor?
That’s the first thing I tried but it didn’t work. I know this is due to the way 3dsMax loads these assemblies into memory and this is out of your control. But if there’s a way to declare these filepaths at run time instead of compile time I can work around it. But I’m afraid my C# skills are not there yet to mess around with the constants and dllimport statements.