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

Editing Cbecc-Com XML input with Python?

asked 2017-11-30 17:38:54 -0500

_sleepyowl gravatar image

updated 2017-12-28 12:52:27 -0500

Hi I was wondering if anyone out there has a workflow that involves editing Cbecc-Com's XML input files with Python? It seems do-able (or does it?), I thought I would ask before I start giving it a go.

My thoughts are:

  1. Create initial Geometry in IES
  2. Export to CBECC-Com
  3. Save CBECC-Com file as XML
  4. Run python scripts to parse/edit XML elements
  5. Import XML to CBECC com
  6. Repeat steps 3-5

Would be interested in hearing any work flows that include python scripts / input files!

edit retag flag offensive close merge delete

Comments

1

I haven't heard of one, but Python has a built-in XML module that could be used for this. Also, CBECC-Com apparently has an API that might be useful.

MatthewSteen gravatar imageMatthewSteen ( 2017-12-01 12:06:44 -0500 )edit
1

I personally haven't done any scripts, but know its possible. There are several firms in the LA and San Francisco area who have presented at local IBPSA meetings on their developed processes which involve this. So all I can say is its very possible!

I know some firms have scripts to take the .idf file, auto-size the HVAC system in EnergyPlus, and then re-import autosized data into the XML file in CBECC-Com, as well as do other processes. If you are located in LA or SF, I'd highly encourage getting involved with IBPSA to chat with these firms.

Anna Osborne Brannon gravatar imageAnna Osborne Brannon ( 2017-12-11 20:14:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-12-14 12:24:58 -0500

updated 2017-12-15 12:01:24 -0500

I simply use excel to go through the input XML file and populate/repopulate fields based on project specific values. Since we collect all project info in an excel file (and also because of my love for excel!), it was easier for us to populate required parts of the XML file based on the spreadsheet in excel. Our workflow involves text processing which is definitely possible in Python. Would be interested to know what you learnt by trying out Python to do the same.

edit flag offensive delete link more

Comments

1

That is actually a very interesting idea! Unfortunately I haven't had any time to play with python and the XML files. We're currently using Energy Pro here at the office with sikuli, which is an automation tool. I've been able to write a few python scrips which allow me to input data from excel -> energy pro using sikuli, but it isn't as efficient as editing the information in the XML document directly. I'm also not a big fan of the Epro/CBECC interface which is why I'd like to edit the XML files.

_sleepyowl gravatar image_sleepyowl ( 2017-12-15 14:46:26 -0500 )edit
1

I'll keep you posted on my progress with python and the XML! I play with python on the side so progress may be slow. Thanks for the excel tip!

_sleepyowl gravatar image_sleepyowl ( 2017-12-15 14:46:51 -0500 )edit

Sikuli seems to be an interesting tool! Thanks for sharing. Will try to explore it.

rsunnam gravatar imagersunnam ( 2017-12-15 15:42:22 -0500 )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: 2017-11-30 17:38:54 -0500

Seen: 145 times

Last updated: Dec 15 '17