Grasshopper

algorithmic modeling for Rhino

Hi Mostapha,


When does the .bat file created by the honeybee component get executed? When I try to run the HDR to GIF component directly from grasshopper it never works, but if I run the .bat file manually from my computer, it works just fine -it creates the .gif file and I can preview it through embryo by copying the file path directly.


The same exact thing is true about the component that creates the .irr file. if I double click the .bat file it works, otherwise, honeybee never creates the .irr file.

GH file attached.

Views: 531

Attachments:

Replies are closed for this discussion.

Replies to This Discussion

Hi Helena,

The execution happens as soon as you connect the image path to the component. The issue that you're mentioning is almost always because of the permission issues in Windows. When it runs from inside the component it doesn't have the same privilege as when you double click on the batch file.

Can you try the attached file? I changed the way the component executes the batch file. Let's see if this will make any difference.

Mostapha

Attachments:

Thank you Mostapha! The 2 components that you circled in red worked! What changes were made to the components? (The second part, with the CIE sky, doesn't, but I assume you didn't change those).

Also, I'm an administrator in my computer, so I haven't figured what are the permission issues that I might be having....what permission issues have you seen in the past? 

Helena

I changed it from subprocess to os. There are two different libraries in Python> http://stackoverflow.com/questions/4813238/difference-between-subpr...

What is the version of Windows that you're using? Also are you using Honeybee for daylighting or Energy simulation and do they work?

Mostapha

I'm using Windows 7 professional. I'm using Honeybee mainly for daylighting, I have used it for energy simulation but not extensively. They both work (daylighting and energy) with some exceptions like the convert HDR-GIF or HDR-HDR and watch the sky.

I copied the code from the HDR-GIF and watch the sky components that you sent me in your file and overwrote the components that I can download directly from this site, so those work now. However, I don't know how to modify the code when I come across another component that has the same problem in my computer.

Please advice! Thank you!

Hi Helena,

You need to replace the line:

runCmdAndGetTheResults( "/c " + projectName + ".bat")

with

os.system(projectName + ".bat")

Hope it helps,

Mostapha

I'll try that, thanks a lot Mostapha! 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service