Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

redinkinc's profile - activity

2015-10-15 09:55:15 -0500 commented answer run oconv with standard input from process within C#

Yes, I know Ladybug, but I like handle this a little different. Running batchfiles is also fine, but in my case Dynamo should serve as some sort of batch file and handle all geometry for radiance for me. I now created a library that works for me. Thanks a lot for the help.

2015-10-15 09:52:08 -0500 commented answer run oconv with standard input from process within C#

Thanks a lot for the advices. After a lot of triing to read and write in binary mode I finally end up in wirting the inputs to a file and running oconv on that within my function, allowing me to build up a whole Dynamo script without having to stop (which was the case in the previous appraoch). Though I'm still not fully satified with this, it works as an first attempt for me. Thanks you!

2015-10-15 09:52:08 -0500 received badge  Commentator
2015-10-12 12:45:46 -0500 commented answer run oconv with standard input from process within C#

"type"ing the input file to oconv results also in a longer .oct. It is even a little bit longer than the one created from the files as parameter. But it ends in the same results as the working octree from files, without the truncated octree warning.

2015-10-11 10:02:51 -0500 received badge  Autobiographer
2015-10-11 05:03:45 -0500 commented answer run oconv with standard input from process within C#

Perhaps for an better understanding. I want to use these functions within Dynamo and created therefore a library (Illumyno on GitHub). It works fine for me if I'm writing all .rad and .oct files and then reuse them in the next node, but using Standard input and output instead would enable me to run all simulation within one Dynamo run instead of several ones.

2015-10-10 12:04:08 -0500 commented answer run oconv with standard input from process within C#

Also thought about that. The octree files always miss some information, i.e. they look the same as the working ines but have a few lines in the end missing. But switching the two lines of code as suggested doesn't (sadly) change a thing.

2015-10-10 12:01:46 -0500 commented answer run oconv with standard input from process within C#

Yes I'm sure. I'm also fetching any exeptions from StandardError. Also if I write my "input" to a file and use this in oconv via the console everything works.

2015-10-09 04:36:51 -0500 commented answer How to create an 10.000 lux overcast grey sky?

@Andyrew: Thanks for your help. Having the sky_glow values set to one resolves in an 10000.77 lux grey sky. Fabian

2015-10-09 02:10:49 -0500 commented answer run oconv with standard input from process within C#

I also tried using Write() instead of WriteLine() with and without EOF. Even tried to use StreamWriter, but the result always stays the same. I'm using this program call also with rtrace and rcalc to input the evaluation points. There everything works fine...

2015-10-09 02:07:59 -0500 commented question run oconv with standard input from process within C#

@mostapha of course. what's the best way to share files here?

2015-10-09 01:50:28 -0500 commented answer run oconv with standard input from process within C#

Code:

public string Execute(string program, string command, string input ) {
var proc = new Process()
{
 StartInfo = new ProcessStartInfo(program, command)
 {
  RedirectStandardInput = true,
  RedirectStandardOutput = true,
  UseShellExecute = false
 }
};
proc.Start();
proc.StandardInput.WriteLine(input);
proc.StandardInput.WriteLine((char)26); //EOF
proc.StandardInput.Flush();
proc.StandardInput.Close();

var result = proc.StandardOutput.ReadToEnd();

proc.WaitForExit();
proc.Close();

return result;
2015-10-09 01:46:20 -0500 commented answer run oconv with standard input from process within C#

To think about EOF is a good start for sure, because most of the times the window of the oconv process is not closing itself (I'm not hiding it, yet), so it seems to wait for another input. I tried a lot with EOF but never got to the point where it runs. perhaps somebody can tell me what oconv wants for EOF? Thanks, Fabian

2015-10-08 11:39:02 -0500 answered a question How to create an 10.000 lux overcast grey sky?

@Andyrew: Thanks for your help. Having the sky_glow values set to one resolves in an 10000.77 lux grey sky. Fabian

2015-10-08 11:38:52 -0500 received badge  Scholar (source)
2015-10-08 11:27:04 -0500 answered a question run oconv with standard input from process within C#

To think about EOF is a good start for sure, because most of the times the window of the oconv process is not closing itself (I'm not hiding it, yet), so it seems to wait for another input. I tried a lot with EOF but never got to the point where it runs. perhaps somebody can tell me what oconv wants for EOF? Thanks, Fabian

2015-10-07 09:46:47 -0500 received badge  Student (source)
2015-10-07 08:40:55 -0500 asked a question How to create an 10.000 lux overcast grey sky?

Hello Again, everything works fine so far, but as I now want to get the illuminance in a room I followed the radiance_tutorial and end up in the following problem: When I use the provded sky.rad and create the sky.mat using gensky as described in the tutorial, I result in the following:

$ echo 0 0 0 0 0 1 | rtrace -I -ab 1 octrees\sky.oct
#?RADIANCE
oconv skies\sky_10klx.mat skies\sky.rad
rtrace -I -ab 1
SOFTWARE= RADIANCE 4.2a lastmod by on w015t-001
CAPDATE= 2015:09:15 11:56:42
GMT= 2015:09:15 09:56:42
FORMAT=ascii
4.751300e+001 5.813355e+001 6.707717e+001

and

echo 0 0 0 0 0 1 | rtrace -I -h -ab 1 octrees\sky.oct | rcalc -e "$1=179(.265$1+.670$2+.065$3)"
10025.4983

This is as near as I can get, but the sky is not grey. Can anyone provide me with an answer? Thanks, Fabian

2015-10-07 08:40:55 -0500 asked a question run oconv with standard input from process within C#

Hi guys, I startet programming my own radiance library in C# and ended up with the following problem: I create my sky, materials and object as strings. When I write this string into a file and then run oconv to create the the octree everything works fine. If I copy/paste the string to the windows cmd using the oconv options "-f -" also everything is fine. But when I start oconv as a process and pass the string to the StandardInput, the octree is generated without warnings but rtrace returns "fatal: truncated octree". Has anyone an idea where the problem might be? thanks, fabian