Attached is a first level macro file which simply separate the sections into sections.
The next step is to remove and copy the sections such as building geo into another section for future coding. (0500 section is reserved for this.)
After that the 0401, 0402, etc. are repeated files. They can be reduced to one macro definition file and use macro lines in the IMF to call them.
This also apply to the zone equipment sections.
The rest of the equipmen and plant is already unique. All you need to do later is to match the branch name in the plant and the node name in the zone equipment.
The heating coil in the zone system air part, has an air path and a water path. The coil object need to be matched again, if the air path name is changed.
I call it a first level macro, because there no imbedded macro, and no conditional selection macro used yet.
Extracted them to one directory, change the ##fileprefix
at the beginning of the .imf to match your directory path. (or delete it to use current directory)
Simulate with EPlaunch openning the .imf. The path is passed by the EPlaunch.
I have not changed anything, the result should be the same as the original IDF of the same name in the exampleFiles folder. This is also the file I am using to help n-Junk for the reheat coil removal problem.
Dr. Li
Date: Wed, 20 Jul 2011 11:33:56 -0700
Subject: Re: [EnergyPlus_Support] EnergyPlus Macros
Thank you Dr. Li.What I know relative to C language is C++, one semester learning, and that was 6 years ago. It is hard to say I know it, but you show me a good demonstration of its functions above.I was looking at the post from Yi Zhang about jEPlus, and tried to use it. I feel like it need to work with ep-macro under its parameter item "search string, alternative values", although I'm not that sure about it.For my work, I was looking for something can help me make easier change on text editor. There is only one step undo on text editor, and if I want to utilize some model from energyplus example file in my project, it's not that easy to do copy, past and edit on either idf or text editor. My experience with energyplus and its supplement software is really limited. If one project has same system with one model in energyplus file, but different zone number and zone name, what will you do to implement the system to the project? Directly create the system in idf or copy and paste from energyplus model in idf or in text editor? Or any better way like something I expected from jeplus. Thank you.Regards,QianminOn Wed, Jul 20, 2011 at 10:58 AM, YuanLu Li <yli006@xxxxxxxxxxx> wrote:
Do you know how the conditional compilation work in C programming?
##include myfilename
would include a file in that location.
============
##def mmName1 [ macroName1, macroNUm1 ]
macroName1 outlet,
,
macroNum1,
end;
##enddef
===============
would define a block of codes.
mmName1 [Z1, 50 ]
would give you:
=============
Z1 outlet,
,
50,end;
==================
It is very powerful variable substitution and calculatin program.
You can sectionize one IDF into many INP files and include them in one IMF file.
EPlaunch would except the IMF file and expand it into epmIDF and simulate.
The direct macro expansion program is done by the EPmacro.exe which is run in the DOS window, as described in the Auxiliary Program pdf.
If you can show me how much you know, I will lead you through.
Dr. Li
To: EnergyPlus_Support@xxxxxxxxxxxxxxx
From: zqianmin@xxxxxxxxx
Date: Wed, 20 Jul 2011 10:32:03 -0700
Subject: [EnergyPlus_Support] EnergyPlus Macros
Could anyone tell me how to start using input macros? I read this part on auxiliaryprograms.pdf, but can't figure it out. I even don't know how to run the EP-Macro program at this time. Thank you for your help.Qianmin
__._,_.___