How to create new component for TRNSYS 17

the basic is desribed in TRNSYS 17 Manual Volumen 1 Getting Started in 1.8. Creating a new component. The problem is, the tutorial was created for a long time, something changed since the Visual Studio .NET 2003 is not availble. When Visual Studio 2003 was used, the TRNSYS Studio compiles the DLL file directly and save them to the UserLib folder. Now, without Visual Studio 2003, you get a notification, and get two file exported. One .cpp file(C++ source file) and one .dsp(project description for Visual Studio). If you have new generation Visual Studio installed, then open the .dsp file with it, then a new .vcxproj file will be created as project desription file for the new Visual Studio – I use Visual Studio Express 2012. Then build the DLL is quite easy. If TRNSYS.h is not found, copy it form “Trnsys17\Compilers\Cpp-Mvs2003\Include”.

actually I wanna do it with MingW and Code::Blocks, somehow I cannot get it working, I will try later. The .dsp file has some configurations for the compiler and Code::Blocks cannot read it properly, I think. If someone knows how it works, please let me know.

2 thoughts on “How to create new component for TRNSYS 17”

  1. Hi, I am a student from University of Wollongong, NSW, Australia. I read your blog about how to create a new component for TRNSYS17 ~ it is very useful! I am using Microsoft Visual Studio 2010 (shell) and Intel Visual Fortran to create a new component. But the VS 2010 can not read the .dsp file. Could I discuss with you through email (Mine: wl950@uowmail.edu.au)

  2. Hi and thanks for your interesting article!

    I am trying to create a new component with C/C++ and Visual Studio Express 2013. Simple components that require only simple calculations are working fine. When I try to use the differential_eqn or solvediffeq function in my code, the files would not compile. Apparently I think the issue is that there is no mentioning of this function and of other functions as well in the TRNSYS.h file that I have. Are you aware of the issue and would you recommend a solution.

    Thank you in advance for your time.

    Best,

    Angelos

Leave a Reply

Your email address will not be published. Required fields are marked *