[TRNSYS-users] Create a new type in TRNSYS

Jianzhou Zhao jianzhou.zhao at unsw.edu.au
Tue Apr 12 02:55:54 PDT 2016


Hello Houssein,

Thanks for your help. I will give it a try.

Best Regards,

Jianzhou

? 12 Apr 2016?7:40 PM?Hsein Moussawi <hsein_moussawi at hotmail.com<mailto:hsein_moussawi at hotmail.com>> ???


Hello J. Zhao,

I had a similar issue recently, here are a few steps I hope would be helpful:

- Be sure to write the code correctly. You can use the template file of creating new types found in your trnsys directory. You can also use the programmer's guide documentation.

- You should have a compiler that can be integrated in the VS. In my case, I used the Intel Visual Fortran Composer XE 2011.

- If you do, open the VS with Fortran supported coding. Next you can open the already available project (.sln) found in the directory: \Trnsys17\Compilers\IvfCXE2011. If another compiler is used, I think you should use the specific file for that compiler (4 files are available).

- Now the project will appear in the Solution Explorer window. Add your type under TRNDLL\Source Files\Types, compile it and set the TRNDLL as startup project.

- Rebuild the TRNDLL with debug and release configurations. The new DLLs will be created in \Trnsys17\Compilers\IvfCXE2011.

- Copy the TRNDLL.dll created in the release folder into \Trnsys17\Exe folder. (Don't delete the original .dll but keep it with different name in case something wrong happened)


In fact, I followed those steps to modify certain component and it worked, so I thought I could share my experience. I hope it would be useful information. You can always refer to the documentation (programmer's guide) for more detailed instructions.

Regards,
Houssein.

________________________________
From: Jianzhou Zhao <jianzhou.zhao at unsw.edu.au<mailto:jianzhou.zhao at unsw.edu.au>>
Sent: Tuesday, April 12, 2016 4:21 AM
To: trnsys-users at lists.onebuilding.org<mailto:trnsys-users at lists.onebuilding.org>
Subject: [TRNSYS-users] Create a new type in TRNSYS


Dear TRNSYS users,



Did anyone successfully create a new component in TRNSYS using Microsoft visual studio?



I followed this:

Create a new component in TRNSYS 17 - export as a FORTRAN file  - Edit the FORTRAN file in VS - Use Release configuration - Build solution

I kept on receiving an error...



I have also tried another way:



Using the existing solution file in C:\Trnsys17\Compilers\IvfCXE2011 - add the export FORTRAN file to the solution - Recompile the solution using MyType as the project file



The compilation seemed to always skip compiling Mytype....





Does anyone have a method for creating a simple component in TRNSYS 17 using VS?



A brief of steps would be much appreciated!!!











_______________________________________________
TRNSYS-users mailing list
TRNSYS-users at lists.onebuilding.org<mailto:TRNSYS-users at lists.onebuilding.org>
http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20160412/6bebf7bf/attachment-0003.htm>


More information about the TRNSYS-users mailing list