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

Re: calling trnsys functions



> Dear all,
>
>   I am creating a C++ program wich makes pre and pos processing, for building simulation.
>
>   How could I call trnsys's functions in order to:
>   1. Generate transfer function coefficient's file?
>
Hi,

if you are working with the multi-zone building (type 56), computing the
transfer functions
requires executing the PREBID program. If you need details on this, you
should probably
contact TRANSSOLAR.

If you need to call some other TRNSYS function from C++ (type 19 and
such ...), the best
way would probably be to create a DLL with these functions with a
FORTRAN compiler.
Then you can make C-style function calls to that DLL. You determine the
arguments
yourself when you make the DLL.

If you're working with DevStudio and MFCs, Mike BLASZCZAK's bible "The
revolutionary
Guide to programing with visual C++" (VROX press) has a good
description, but there are
a thousand others, of course.

>   2. Run trnsys?
>

This depends on the operating system you are using. Usally there are
system calls
provided by the C++ environment. For example, IISiBat 3 (which is
written in C++
for WINDOWS) uses the ::ShellExecuteEx() and ::CreateProcess() APIs
(depending on
wether it is running on WIN 95, NT, or WIN 2000 - unfortunatly the
different Windows
versions are quite different in that respect). You can look up how these
functions work
in the documentation of your development environment (e.g., in
DevStudio, type
"ShellExecuteEx", put the cursor on top, and hit F1).

Hope this helps,

Werner

Karin Maria Chvatal wrote:

> Dear all, I am creating a C++ program wich makes pre and pos
> processing, for building simulation. How could I call trnsys's
> functions in order to:1. Generate transfer function coefficient's
> file?2. Run trnsys? What are the parameters for these functions? Could
> anyone give me an example? thanks, kind regards, Karin Maria
> Chvatalp.h.d studentMechanical Engineering InstituteUniversity of
> Porto.Portugal.