Forum Discussion

Hafedh_Elfaleh's avatar
6 years ago
Solved

Implement a method that calls a method in a DLL

Hi all ,

Please how to Implement a method that calls a method in a DLL?
Thanks .

  • Suhas's avatar
    Suhas
    6 years ago

    Below is the link for how to create DLL in VS:

     https://www.c-sharpcorner.com/UploadFile/1e050f/creating-and-using-dll-class-library-in-C-Sharp/

    1. Copy the calculation.dll in server bin folder  e.g.(C:\Program Files (x86)\Aras\Innovator\Innovator\Server\bin).

    Register your dll in method-config.xml file (C:\Program Files (x86)\Aras\Innovator\Innovator\Server) 

    1. Open method-config.xml file :

    2. Add your dll the namespace under <ReferencedAssemblies> xml tag

     

    3. Add your dll reference in <Template name="CSharp">

    Create your method in Aras and call your dll method from aras method.

    Thanks and regards,

    Suhas

  • Suhas's avatar
    Suhas
    6 years ago

    Hello Hafedh,

    In which .net framework version you compiled your dll?

    Please make sure your dll should be compiled in .net framework 4.0.

    Regards,

    Suhas

11 Replies

  • Hello Hafedh,

    1. Create your own dll using ClassLibrary application with the help of VS.

    2. Copy your dll into Server bin folder e.g.(C:\Program Files (x86)\Aras\Innovator\Innovator\Server\bin).

    3. Register your dll in method-config.xml file (C:\Program Files (x86)\Aras\Innovator\Innovator\Server) 

    4. Create your own method in aras and in that method create object of dll class and call your method by using newly created object.

    Thanks and regards,

    Suhas

    • Hafedh_Elfaleh's avatar
      Hafedh_Elfaleh
      Ideator I

      thank you Suhas for the reply 
      can you please provide me by an example that explain me more about how  to create the aras method that calls the dll method.
      thanks .

      • Suhas's avatar
        Suhas
        Ideator I

        Below is the link for how to create DLL in VS:

         https://www.c-sharpcorner.com/UploadFile/1e050f/creating-and-using-dll-class-library-in-C-Sharp/

        1. Copy the calculation.dll in server bin folder  e.g.(C:\Program Files (x86)\Aras\Innovator\Innovator\Server\bin).

        Register your dll in method-config.xml file (C:\Program Files (x86)\Aras\Innovator\Innovator\Server) 

        1. Open method-config.xml file :

        2. Add your dll the namespace under <ReferencedAssemblies> xml tag

         

        3. Add your dll reference in <Template name="CSharp">

        Create your method in Aras and call your dll method from aras method.

        Thanks and regards,

        Suhas

    • hammami's avatar
      hammami
      Ideator I

      Hi suhas i ask you,  have you idea, the DLL work in aras Method with program that connect database oracle in VS? Contact me .

      • Suhas's avatar
        Suhas
        Ideator I

        It means you want to connect Aras & oracle database with the help of DLL? Can you please elaborate your use case?