Photonics

Photonics

Topics related to Lumerical and more.

Advanced material plugin: DLL generation

    • tavak
      Subscriber

      I wanted to define and modify a two-level system model based on the instructions in this video. I followed the procedure exactly and worked with the files on the official webpage (twolevelexample.zip). The DLL file was successfully generated, and the output log is similar to the one in that video. However, I couldn't find the new material in the list after copying the generated DLL file into the appropriate directory. I guess something is wrong with my generated DLL file because the new material appeared on the list when I used the original DLL available in (twolevelexample.zip). In other words, the program did not recognize the DLL file and the material associated with that. I tried the same procedure for other materials and their associated DLLs, e.g., step-index, and got similar similar disappointing results. Thanks in advance for the helpful comments and solutions.

    • Guilin Sun
      Ansys Employee

      Did you move the newly generated dll file into the folder :

    • tavak
      Subscriber

      Many thanks for the reply. I tried this directory as well, and it didn't work. I put an original DLL, e.g., stepindex.dll (downloaded from this webpage), in the following directory, and it worked. However, if I rebuild it by myself via the files available on that webpage, i.e., "stepindex.h" and "stepindex.cpp", it wouldn't work.

      The directory: C:\Program Files\Lumerical\v232\bin\plugins\materials

      I guess the issue is related to the DLL generation process, for which I used Visual Studio 2022. Do I need an additional or specific setting for the DLL building (compiling)?

    • Guilin Sun
      Ansys Employee

      I guess it is related to the complier version. Since not many people create their own plugin materials, I am not sure which version of Visual Studio is supported. What I found is like this:

      • For versions of FDTD up to the 2016b release, use Visual Studio 2008
      • For versions of FDTD from the 2017a release onwards, use Visual Studio 2013
    • tavak
      Subscriber

      Thanks for addressing the glitch and being to the point. The solution was helpful. I tried via Visual Studio 2010 and it worked well.

    • Guilin Sun
      Ansys Employee

      Thank you for letting me know. You may also try  2019+ version later.

Viewing 5 reply threads
  • The topic ‘Advanced material plugin: DLL generation’ is closed to new replies.