4

How to insert a row between EMS:Program rows in E+

In EMS:Program object sometimes it is required to add a code between codes you have written. For instant, I've written 100 lines of codes and I intend to insert five lines code between lines A44 and A45. regularly I should move line A100 to A104 and line A99 to A103 etc, in order to have 4 blank lines from A44 to A48. well it is time-consuming and boring. Is there any simpler way?

taher.ahel's avatar
436
taher.ahel
asked 2018-11-18 04:05:57 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

4

The easiest way to insert new rows of EMS code in a program object is using a text editor (NotePad, e.g.). Below is an example of inserting three new EMS lines in a program after line A4.

EnergyManagementSystem:Program,
  VAV_5_NightCycleMGR,     !- Name
  SET Toffset = 0.8333,    !- Program Line 1
  SET NoAction = 0.0,      !- Program Line 2
  SET ForceOff = 1.0,      !- A4
  New EMS Line 1,
  New EMS Line 2,
  New EMS Line 3,
  SET CycleOn = 2.0,       !- A5
  ...

Notice that I have not added comments after !- to the right of each new EMS line. After saving the IDF in your text editor, you can then open the same updated IDF in IDF Editor. If you save in IDF editor, it will automatically update the line number comments to the right for you (see below).

EnergyManagementSystem:Program,
  VAV_5_NightCycleMGR,     !- Name
  SET Toffset = 0.8333,    !- Program Line 1
  SET NoAction = 0.0,      !- Program Line 2
  SET ForceOff = 1.0,      !- A4
  New EMS Line 1,          !- A5
  New EMS Line 2,          !- A6
  New EMS Line 3,          !- A7
  SET CycleOn = 2.0,       !- A8
  ...
Aaron Boranian's avatar
14.1k
Aaron Boranian
answered 2018-11-18 16:23:27 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
1

@Aaron Boranian is perfectly right (and his answer should be accepted).

To state the obvious and be perfectly clear, the rule is: * anything that starts with !- is a comment that isn't retained, and, * anything that starts with ! (no -) would be retained.

In both cases, these are comments and do not affect in any shape or form how stuff is being understood by the E+ Input processor that reads your IDF file.

These !- in particular will be (re)added by the IDF editor upon save, and you can think of them as visual aids when you edit stuff in a text editor.

Julien Marrec's avatar
29.7k
Julien Marrec
answered 2018-11-19 03:23:33 -0500
edit flag offensive 0 remove flag delete link

Comments

1

Thank you Julien for supplementary explanations.

taher.ahel's avatar taher.ahel (2018-11-19 06:01:33 -0500) edit
add a comment see more comments