"E1 Sys1 (PTAC) (G.WNW2)" = SYSTEM
TYPE = PTAC
HEAT-SOURCE = HEAT-PUMP
BASEBOARD-SOURCE = NONE
SIZING-RATIO = 1.15
MAX-SUPPLY-T = 90
MIN-SUPPLY-T = 55
FAN-SCHEDULE = "S1 Sys1 (PTAC) Fan Sch"
FAN-CONTROL = TWO-SPEED
SUPPLY-STATIC = 0.5
SUPPLY-EFF = 0.33
COOLING-EIR = 0.329152
HEATING-EIR = 0.34025
..
"E1 WNW Perim Zn (G.WNW2)" = ZONE
TYPE = CONDITIONED
MIN-FLOW-RATIO = 1
FLOW/AREA = 0.5
OA-FLOW/PER = 34.6035
DESIGN-HEAT-T = 72
HEAT-TEMP-SCH = "S1 Sys1 (PTAC) Heat Sch"
DESIGN-COOL-T = 75
COOL-TEMP-SCH = "S1 Sys1 (PTAC) Cool Sch"
SIZING-OPTION = ADJUST-LOADS
SPACE = "Unit 100"
..
I have this text file for the building energy modeling.
The system (E1 Sys1 (PTAC) (G.WNW2)) and zone (E1 WNW Perim Zn (G.WNW2)) are a pair.
I would like to replace the system name and zone name by referring the space name and adding abbreviations (e.g. _sys, _zn) to make those easy to understand.
The space name will be at the bottom of zone part.
Could you please help me to replace the above with the following?
"Unit 100_sys" = SYSTEM
TYPE = PTAC
HEAT-SOURCE = HEAT-PUMP
BASEBOARD-SOURCE = NONE
SIZING-RATIO = 1.15
MAX-SUPPLY-T = 90
MIN-SUPPLY-T = 55
FAN-SCHEDULE = "S1 Sys1 (PTAC) Fan Sch"
FAN-CONTROL = TWO-SPEED
SUPPLY-STATIC = 0.5
SUPPLY-EFF = 0.33
COOLING-EIR = 0.329152
HEATING-EIR = 0.34025
..
"Unit 100_zn" = ZONE
TYPE = CONDITIONED
MIN-FLOW-RATIO = 1
FLOW/AREA = 0.5
OA-FLOW/PER = 34.6035
DESIGN-HEAT-T = 72
HEAT-TEMP-SCH = "S1 Sys1 (PTAC) Heat Sch"
DESIGN-COOL-T = 75
COOL-TEMP-SCH = "S1 Sys1 (PTAC) Cool Sch"
SIZING-OPTION = ADJUST-LOADS
SPACE = "Unit 100"
..
you can try something along the lines of:
This code assumes that it will run into a line where SPACE = xxx, else it will crash. Hope this helps