<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
<div>Hello Houssein,</div>
<div id="AppleMailSignature"><br>
</div>
<div id="AppleMailSignature">Thanks for your help. I will give it a try.</div>
<div id="AppleMailSignature"><br>
Best Regards,
<div><br>
</div>
<div>Jianzhou </div>
</div>
<div><br>
在 12 Apr 2016,7:40 PM,Hsein Moussawi <<a href="mailto:hsein_moussawi@hotmail.com">hsein_moussawi@hotmail.com</a>> 写道:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello J. Zhao,</p>
<p>I had a similar issue recently, here are a few steps I hope would be helpful:</p>
<p>- 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. </p>
<p>- You should have a compiler that can be integrated in the VS. In my case, I used the Intel Visual Fortran Composer XE 2011.</p>
<p>- 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).</p>
<p>- 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.</p>
<p>- Rebuild the TRNDLL with debug and release configurations. The new DLLs <span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;">will </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;">be </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;">created </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;">in </span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;">\Trnsys17\Compilers\IvfCXE2011.</span><span style="font-size: 12pt;"></span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;">- 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)</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji', EmojiSymbols; font-size: 16px;"><br>
</span></p>
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.
<div><br>
<div>Regards,</div>
<div>Houssein.<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Jianzhou Zhao <<a href="mailto:jianzhou.zhao@unsw.edu.au">jianzhou.zhao@unsw.edu.au</a>><br>
<b>Sent:</b> Tuesday, April 12, 2016 4:21 AM<br>
<b>To:</b> <a href="mailto:trnsys-users@lists.onebuilding.org">trnsys-users@lists.onebuilding.org</a><br>
<b>Subject:</b> [TRNSYS-users] Create a new type in TRNSYS</font>
<div> </div>
</div>
<div>
<div>
<p style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
Dear TRNSYS users,</p>
<p style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
Did anyone successfully create a new component in TRNSYS using Microsoft visual studio?</p>
<p style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
I followed this:</p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
Create a new component in TRNSYS 17 – export as a FORTRAN file  - Edit the FORTRAN file in VS – Use Release configuration – Build solution
</p>
<p style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
I kept on receiving an error…</p>
<p style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
I have also tried another way:</p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
Using the existing solution file in C:\Trnsys17\Compilers\IvfCXE2011 – add the export FORTRAN file to the solution - Recompile the solution using
<b>MyType</b> as the project file</p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
The compilation seemed to always skip compiling Mytype…. </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
Does anyone have a method for creating a simple component in TRNSYS 17 using VS? </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
A brief of steps would be much appreciated!!!</p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
<p style="margin: 0cm 0cm 0.0001pt 36pt; font-size: 11pt; font-family: Calibri, sans-serif;">
 </p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>TRNSYS-users mailing list</span><br>
<span><a href="mailto:TRNSYS-users@lists.onebuilding.org">TRNSYS-users@lists.onebuilding.org</a></span><br>
<span><a href="http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org">http://lists.onebuilding.org/listinfo.cgi/trnsys-users-onebuilding.org</a></span><br>
</div>
</blockquote>
</body>
</html>