Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1425
Custom Function Library at Runtime
posted

Hi All,

I'm currently implementing a way to plug in custom UltraCalcFunction's into an application that uses Infragistics. I'd like the functions to appear in the FormulaBuilderDialog that is used at runtime, and elsewhere in the applciation.

The sample application showing how to write your own custom functions is great - and it's nice and simple to add custom functions statically at design time, but in order to allow other developers to write functions for this application who do not have Infragistics, I'd like the application to be able to load functions that do not derive from UltraCalcFunction.

I don't have a problem in turning a different function object into an UltraCalcFunction object, but the problem is getting it plugged into the calc network...

I understand you have to create a DLL that contains one class that inherits from UltraCalcUserDefinedLibraryBase and the function classes that derive from UltraCalcFunction, and reference this DLL in a solution - placing an instance of the class that inherits from UltraCalcUserDefinedLibraryBase on the Form that contains the CalcManager. But this obeviously requires the DLL to be created beforehand.

I've seen ways to build assemblies dynamically using the .NET CodeDOM, which seems like it could help with this, but it's a grey area to me.

Is there a tried-and-tested way to load custom UltraCalcFunctions at runtime without the need to create a solution with an UltraCalcUserDefinedLibrary?

Any ideas will be greatly appreciated.

Cheers,

Richard

Parents
No Data
Reply
  • 1425
    posted

    While I've been waiting for a reply, I've been playing about with the CodeDOM libraries and have implemented a workaround to generate a DLL that contains a custom library and all the cusotom functions at runtime. This plugs into Calc Network nicely.

    I'd be interested to know of any other ways to do this, if there are any, as this is a bit of minor mission to use the CodeDOM.

    Cheers,

    Richard

Children