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

Anyone experimenting w/ python scripts for IES?

asked 2018-11-06 10:56:39 -0600

Angeliki gravatar image

updated 2018-11-08 08:39:48 -0600

I was experimenting with few of the scripts and VE Scripts give me some weird outputs..

Example:

room_data = body.get_room_data(0)

general_data = room_data.get_general()

room_conditions_data = room_data.get_room_conditions()

system_data = room_data.get_apache_systems()

room_data.set(general_data, room_conditions_data, system_data)

Output:

Traceback (most recent call last): File "L:\XXXX\Testing_get_set.py", line 26, in <module> room_data.set(general_data, room_conditions_data, system_data) RuntimeError: unrecognised option: general_template_name

I don't understand why. I tried to set the data I got from IES without changing anything or adding any words to the dictionary.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2018-11-07 05:42:06 -0600

Angeliki gravatar image

Since this means that I am trying to assign something to a field that is not recognized, I measured the length of the dictionary I got for each type of data and got the following results:

General data No. of fields: 14

Room condition No. of fields: 38

System data No. of fields: 46

This is where it gets interesting… if you open the VE User Guide (in page 82) in all the ‘set’ methods for each of the above the fields you can set (Dictionary keys) are shorter in length:

General data No. of fields: 7

Room condition No. of fields: 31

System data No. of fields: 39

Following that lead I removed all the field that were not recognized and it worked, I am now testing if it does what I wanted.

Note that I found that there is a simpler way to do it:

example:

room_data = body.get_room_data(0)

general_data = { 'field you want to alter': 'new value'}

room_data.set_general(general_data)

edit flag offensive delete link more
2

answered 2018-11-06 11:00:44 -0600

crduggin gravatar image

I would send it to IES support. I have seen some of the scripts in the library not working after updating to VE2018. The one to plot all the variation profiles won't work for me now.

edit flag offensive delete link more

Comments

oh hello again ! thanks a lot for the response ! Will do that but I think I found a simpler way to do what I wanted anyway!

Angeliki gravatar imageAngeliki ( 2018-11-07 05:35:50 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2018-11-06 10:56:39 -0600

Seen: 53 times

Last updated: Nov 07