4

Editing Cbecc-Com XML input with Python?

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!

_sleepyowl's avatar
101
_sleepyowl
asked 2017-11-30 17:38:54 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-12-28 12:52:27 -0500
edit flag offensive 0 remove flag 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's avatar MatthewSteen (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's avatar Anna Osborne Brannon (2017-12-11 20:14:26 -0500) edit
add a comment see more comments

1 Answer

3

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.

rsunnam's avatar
960
rsunnam
answered 2017-12-14 12:24:58 -0500, updated 2017-12-15 12:01:24 -0500
edit flag offensive 0 remove flag delete link

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's avatar _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's avatar _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's avatar rsunnam (2017-12-15 15:42:22 -0500) edit
add a comment see more comments