Soteris's response about placing the DLL in the
..\Trnsys16\UserLib\ReleaseDLLs\ directory is quite correct. You might
also want to add the "SAVE" attribute to your ALLOCATABLE array
declarations. If you don't have that, some compilers will deallocate
your allocatable arrays automatically every time you leave the
subroutine in which they are declared. I think the IVF compiler is set
to SAVE those arrays by default but it is a good idea to make sure.
Also make sure that on the IF (INFO(8)=-1) call, deallocate those
arrays with something like IF (INFO(8).EQ.-1) THEN IF (ALLOCATED(ArrayName)) DEALLOCATE(ArrayName) RETURN 1 END IF best, David On 8/3/2010 12:08, alberto.picinardi@tiscali.it wrote: Dear Trnsys Users, I’m a new user of Trnsys and it’s the first time I create a new type. I wrote a code (Type182.f90) to read 2 different . txt files, mappa_ABS.txt and mappa_HD.txt, and simulate the coupling between an ABS chiller and a desalinator. From this code I created the library Type182.dll using Visual Studio 2008 (I followed the instruction of 08-ProgrammersGuide.pdf in the section “Instructions to add a new project to the Ivf90-Mvs2003 Solution”). At this point I created a simple Project.ptf to test the new component, but I obtain this error: *** Fatal Error at time : 0.000000 Generated by Unit : 4 Generated by Type : 182 TRNSYS Message 105 : A TYPE was called in the TRNSYS input file but was either not linked into trndll.dll or was not found in an external dll. A dummy subroutine was called in its place. Please link the TYPE or remove it from the input file Reported information : Not available Anyone can help me??? You can find all these files in attached to this email: • Type182.f90 • Type182.tmf • mappa_ABS.txt and mappa_HD.txt (to paste in folder C:\Program Files\Trnsys16\SourceCode\MySource) • Type182.dll • Project.dck Thanks in advance, Ph.D. Alberto Picinardi University of Bergamo, Italy Risparmia con Tutto Incluso Light: telefono + adsl 8 mega a soli 19,95 € al mese per un anno! SCONTO DI 120 EURO! L’offerta è valida solo se attivi entro il 29/07/10 http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso_light/?WT.mc_id=01fw_______________________________________________ TRNSYS-users mailing list TRNSYS-users@cae.wisc.edu https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users -- *************************** David BRADLEY Principal Thermal Energy Systems Specialists, LLC 22 North Carroll Street - suite 370 Madison, WI 53703 USA P:+1.608.274.2577 F:+1.608.278.1475 bradley@tess-inc.com http://www.tess-inc.com http://www.trnsys.com |