[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] assign a n external file to a new type



Javier,

Dear all;I am Javier Mota from 3i,Madrid.
I´m programing a new component in C++.But I have a problen. I don´t Know how I must work to make the program reads the external file when i asign it a parameter like logical unit in the proforma.

I am not aware of a way to share logical units between a Fortran DLL and a C++ DLL. In case you can't get it to work, I wanted to mention another option to handle files in TRNSYS: you can use labels to pass filename(s) to your component and then handle file opening, access etc. completely in the Type. This is done in some of the standard Types, e.g. the Matlab link (Type 155). You can take a look at the code of that component to get a better idea of what I mean. Note that the filename handling is done in the "ReadParameters" subroutine (~line 500). Also, if you open the CVF project and look for Type 155, it is in a separate project (i.e. in "Type155 files", not in "TRNDll files".

I hope this helps,

Michaël Kummert

_________________________________________________________________

Michaël Kummert

École Polytechnique de Montréal - Génie Mécanique
Case Postale 6079, succursale Centre-Ville
Montréal   QC   H3C 3A7
Canada

Tel: +1 (514) 340-4711, Ext. 3367
Fax: +1 (514) 340-5917
Email : michael.kummert à polymtl.ca