<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello all,<div class=""><br class=""></div><div class="">I managed to build a customized TRNSYS Type in C++ by extending the Type202 example that is delivered with TRNSYS 17. I can access the input values and return the corresponding output values without any problems. However, the communication with the TRNSYS Core functions somehow don’t work. Whenever I invoke some function that returns an integer value (like getMaxLabelLength()), the result is NaN. Whenever I try to invoke some function that returns characters (like getDeckFileName()), TRNSYS crashes with something like „Access violation at address XXXXX in module ‚TRNDLL.DLL‘. Write of address XXXXX.“ or with „forttrl: severe (408): fort: (18): Dummy character variable ‚GETLABEL@0‘ has length 300 which is greater than actual variable length 1“ (in case of getLabel).</div><div class=""><br class=""></div><div class="">As I read in other topics like this one, there seemed to be several issues in the TRNSYS.h header file and the library files long ago: </div><div class=""><a href="https://www.mail-archive.com/trnsys-users@engr.wisc.edu/msg00005.html" class="">https://www.mail-archive.com/trnsys-users@engr.wisc.edu/msg00005.html</a></div><div class=""><br class=""></div><div class="">However, 11 years later, is there a workaround for this problem?</div><div class=""><br class=""></div><div class="">Thanks in advance.</div><div class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;" class=""><br class="Apple-interchange-newline">--</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;" class="">M.Sc. Michael Holzhauser<br class="">AG Optimization<br class="">University of Kaiserslautern<span class="Apple-tab-span" style="white-space: pre;"> </span><span class="Apple-tab-span" style="white-space: pre;">  </span><br class=""><br class="">Paul-Ehrlich-Str. 14 - 451<br class="">67663 Kaiserslautern, Germany<br class=""><span class="Apple-tab-span" style="white-space: pre;">       </span><span class="Apple-tab-span" style="white-space: pre;">  </span><br class="">Phone: <span class="Apple-tab-span" style="white-space: pre;"> </span>+49 (631) 205-2511<br class="">E-mail: <a href="mailto:holzhauser@mathematik.uni-kl.de" class="">holzhauser@mathematik.uni-kl.de</a><br class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: 2; widows: 2;" class=""><a href="http://www.mathematik.uni-kl.de/~holzhauser" class="">www.mathematik.uni-kl.de/~holzhauser</a></div>
</div>
<br class=""></div></body></html>