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

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

asked 2018-11-18 04:05:57 -0600

taher.ahel's avatar

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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2018-11-18 16:23:27 -0600

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
  ...
edit flag offensive delete link more
1

answered 2018-11-19 03:23:33 -0600

@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.

edit flag offensive delete link more

Comments

1

Thank you Julien for supplementary explanations.

taher.ahel's avatar taher.ahel  ( 2018-11-19 06:01:33 -0600 )edit

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: 2018-11-18 04:05:57 -0600

Seen: 321 times

Last updated: Nov 19 '18