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

Re: [TRNSYS-users] New component in other programming languages



Hello,

 

The programming language you are using must only be able to produce a native Windows DLL (note that some languages in the Microsoft .NET framework also produce “DLL” files, but depending on the language / compile options these only work with the framework (CLR, Common Language Runtime); you cannot execute such a DLL targeted for the framework as a TRNSYS type).

 

I am not an expert with Visual Basic, and I’m not sure it can directly produce native DLLs (but only “managed” DLLs for the CLR); you would then have to create a native DLL with another language and call your program from that DLL.   

 

If you just want to use Basic to program a TYPE, there is a much simpler solution though: You can use VBA (Visual Basic for Applications) via Excel.

Look at the Examples

 

.\Trnsys16\Examples\Calling Excel

 

to see how it works. (To see the Basic code, just open the .xls file and hit Alt-F11).

 

If you are not using FORTRAN or C, you can only use the generated skeletons as models, but you have to translate them to the language you use, of course.

 

Hope this helps,

 

Werner

 


De : trnsys-users-bounces@engr.wisc.edu [mailto:trnsys-users-bounces@engr.wisc.edu] De la part de suzukihideaki1027@yahoo.co.jp
Envoyé : mardi 9 janvier 2007 06:00
À : TRNSYS-users@engr.wisc.edu
Objet : [TRNSYS-users] New component in other programming languages

 

Dear TRNSYS users

 

I try to create a new compornent(TYPE) in TRNSYS16.
In manual, TRNSYS can create a new component(TYPE) in Fortran and C++ and Other languages.
Can I create it in Visual Basic.net?
Are there any problems(generate skeleton and etc...),if I can do that?

I would be grateful for your support.

 

Thanks you all.

 

 


Start Yahoo! Auction now! Check out the cool campaign