First time here? Check out the Help page!

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 6 years ago

Angeliq's avatar

updated 6 years ago

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.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 6 years ago

Angeliq's avatar

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)

Preview: (hide)
link
2

answered 6 years ago

crduggin's avatar

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.

Preview: (hide)
link

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!

Angeliq's avatar Angeliq  ( 6 years ago )

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 1,148 times

Last updated: Nov 07 '18