[Equest-users] eQuest & NoteTab Question

Julien Marrec julien.marrec at gmail.com
Fri Sep 11 08:02:29 PDT 2015


Christopher,

I agree that regex can be intimidating but the site I posted should help a
lot.

And once you have climbed that learning curve... http://xkcd.com/208/

Cheers and happy friday,
Julien

--
Julien Marrec, EBCP, BPI MFBA
Energy&Sustainability Engineer
T: +33 6 95 14 42 13

LinkedIn (en) : www.linkedin.com/in/julienmarrec
LinkedIn (fr) : www.linkedin.com/in/julienmarrec/fr
<http://www.linkedin.com/in/julienmarrec>

2015-09-11 15:18 GMT+02:00 Jones, Christopher <
Christopher.r.Jones at wspgroup.com>:

> Oops, hit the send button too soon.
>
>
>
> I use UltraEdit for editing .inp files. I am pretty sure you can record
> macros with NotePad++ the same way you can with UltraEdit.
>
>
>
> After search and replace PSZ for HP.
>
> Record Macro:
>
> Search for PSZ,
>
> Search for ‘ = ZONE’
>
> Ctrl Left Arrow
>
> Ctrl Left Arrow
>
> Left Arrow (the cursor is now at the end of the zone name)
>
> Shift Home,
>
> Ctrl C
>
> Search Previous for ‘ = SYSTEM’
>
> Carriage Return
>
> Type ‘CONTROL-ZONE = ‘
>
> Ctrl V
>
> End Record Macro
>
> Run macro once or twice to make sure it is doing the correct thing.  Then
> run the macro to the end of the file.
>
>
>
> This works fine as long as the control zone is the first zone after the
> system definition.
>
>
>
> Regex is very cool and powerful but you can spend a quite a bit of time
> climbing that learning curve.
>
>
>
>
>
>
>
>
>
> [image: cid:image003.png at 01D09C46.E75BA0D0]
>
> *Christopher Jones,* P.Eng.
> Senior Engineer
>
>
>
> *WSP Canada Inc.*
>
> 2300 Yonge Street, Suite 2300
>
> Toronto, ON M4P 1E4
> T +1 416-644-4226
>
> F +1 416-487-9766
>
> C +1 416-697-0065
>
>
>
> www.wspgroup.com
>
>
>
> *From:* Equest-users [mailto:equest-users-bounces at lists.onebuilding.org] *On
> Behalf Of *David Reddy
> *Sent:* Thursday, September 10, 2015 11:56 AM
> *To:* equest-users at lists.onebuilding.org
>
> *Subject:* Re: [Equest-users] eQuest & NoteTab Question
>
>
>
> We typically use RegExs for tasks like this as well, but I had not run
> across the Regular Expressions 101 <https://regex101.com/> site before;
> what a great resource Julien!  Very cool way to keep track of expressions
> and share. Thanks for circulating these examples!
> David
>
> On 9/10/2015 12:26 AM, Julien Marrec wrote:
>
> Jesse,
>
> I've created an example here : https://regex101.com/r/iZ5jO8/1. This
> should really help understanding how I'm getting the result, by decomposing
> each step of the regex.
>
> Note that I added names to capturing groups, you don't have to do that,
> you could use just positional:
>
> Look for: (SYSTEM *\n *?TYPE *= )HP(.*?FURNACE-HIR +?=
> [.0-9]+)\n(.*?\.\.\n)(\".*?\")
>
> Replace with: \1PSZ\2\n   CONTROL-ZONE     = \4\n\3\4
>
>
>
> A few things: dot (.) has to match newline characters for it to work.
>
> Also, in notepad++ to replace with named capturing groups, you use $+{Name}
>
> You have to replace \n (unix convention) by \r\n.
>
> Anyways, for notepad++ try:
>
> Search:
> (?<System1>SYSTEM *\r\n *?TYPE *= )HP(?<System2>.*?FURNACE-HIR +?=
> [.0-9]+)\r\n(?<System3>.*?\.\.\r
> \n)(?<ZoneName>\".*?\")
>
> Replace with:
> $+{System1}PSZ$+{System2}\n   CONTROL-ZONE     =
> $+{ZoneName}\n$+{System3}$+{ZoneName}
>
>
>
>
>
> I've loaded it up in eQuest, seems to do the job just fine. Let me know if
> you are trouble implementing. I've also attached the file back, but I'd be
> a shame to not take this as an opportunity to learn regex
>
> PS: By the way, you should really use floor multipliers.
>
> Best,
>
> Julien
>
>
>
>
> --
> Julien Marrec, EBCP, BPI MFBA
> Energy&Sustainability Engineer
> T: +33 6 95 14 42 13
>
> LinkedIn (en) : www.linkedin.com/in/julienmarrec
> LinkedIn (fr) : www.linkedin.com/in/julienmarrec/fr
>
>
>
> 2015-09-09 22:32 GMT+02:00 Phillips, Jesse <jphillips at rdkengineers.com>:
>
> Thanks Julien.
>
>
>
> I’ve attached the inp file.  I am not familiar with Regex at all but I’ll
> check out that website.  If you could send me some examples tomorrow
> though, that would be great!
>
>
>
> thanks,
>
>
>
> Jesse
>
>
>
> *From:* Julien Marrec [mailto:julien.marrec at gmail.com]
> *Sent:* Wednesday, September 09, 2015 4:27 PM
> *To:* Phillips, Jesse <jphillips at RDKEngineers.com>
> <jphillips at RDKEngineers.com>
> *Cc:* Nathan Miller <nathanm at rushingco.com>;
> equest-users at lists.onebuilding.org
> *Subject:* Re: [Equest-users] eQuest & NoteTab Question
>
>
>
> Hi,
>
> I don't know Notetab, but as long as you have one system for each zone,
> this is pretty easy if your editor supports Regular Expressions (Regex).
>
> As you might know, inp files has what I call a positional input for a few
> things (space > surface > window/door, same for system > zone). Meaning if
> you find something that is a system, everything that's right after (which
> are zones) below to this system until you find another system. As opposed
> to having a keyword linking those two objects.
>
> So you could use a regex for this job. Especially using positive
> lookaheads to delimit a single system and its zone (singular here, could be
> plural).
>
> If you do have only a single zone per system, it's even easier.
>
> Just look for a system and it's zone below it.
>
> If you are not familiar with regex and can't manage to build it, let me
> know, I'll try to find a few tomorrow to help you out (send me your file or
> an extract or it so I don't have to create a dummy one to play with it).
>
> By the way, here's a website I wish existed when I first started playing
> with regex: https://regex101.com/. Fyi, Notepad++ uses the prce engine.
>
> Cheers,
>
> Julien
>
>
>
>
> --
> Julien Marrec, EBCP, BPI MFBA
> Energy&Sustainability Engineer
> T: +33 6 95 14 42 13
>
> LinkedIn (en) : www.linkedin.com/in/julienmarrec
> LinkedIn (fr) : www.linkedin.com/in/julienmarrec/fr
>
>
>
> 2015-09-09 22:04 GMT+02:00 Phillips, Jesse <jphillips at rdkengineers.com>:
>
> I don’t think you can create macros in NoteTab.  What would that macro
> look like in boxer?
>
>
>
> Jesse Phillips
>
> Energy Engineer
>
> RDK Engineers
>
> P: 857-221-5957
>
>
>
> *From:* Nathan Miller [mailto:nathanm at rushingco.com]
> *Sent:* Wednesday, September 09, 2015 3:38 PM
> *To:* Phillips, Jesse <jphillips at RDKEngineers.com>;
> equest-users at lists.onebuilding.org
> *Subject:* RE: eQuest & NoteTab Question
>
>
>
> Can you create a macro that searches for each instance of “=ZONE”, copies
> the text before the “=” to get the zone name, and the pastes in the lines
> necessary to create a new single zone system, using the zone name now
> stored in the clip-board to paste in the control zone?
>
>
>
> I’m not familiar with NoteTab, but you can do that in boxer.
>
>
>
>
>
> *Nathan Miller, PE, LEED AP BD+C** – **Mechanical Engineer/Senior Energy
> Analyst*
>
> *RUSHING* | *D* 206-788-4577 |*O* 206-285-7100
>
> *www.rushingco.com <http://www.rushingco.com>*
>
>
>
> *From:* Equest-users [mailto:equest-users-bounces at lists.onebuilding.org
> <equest-users-bounces at lists.onebuilding.org>] *On Behalf Of *Phillips,
> Jesse
> *Sent:* Wednesday, September 09, 2015 3:23 PM
> *To:* equest-users at lists.onebuilding.org
> *Subject:* [Equest-users] eQuest & NoteTab Question
>
>
>
> Hi,
>
>
>
> I have a model with 233 zones.  Right now, every zone has a water loop
> heat pump.  I want to convert these all to packaged single zone systems.
> To do this, I am working in the .inp file and doing a “find and replace” in
> NoteTab.  The replacing of the system type is easy.  I simply search for
> the “type      = HP” line and replace with “type     = PSZ”.  However, the
> PSZ system requires a control zone.  I would like each control zone to be
> the zone in which that particular system resides.  Which means, for each of
> my 233 zones, I will have a different control zone (i.e. no longer a simple
> find and replace search).
>
>
>
> Does anyone know of a way to use “find and replace” (or another method) to
> set each control zone with the zone name which the system resides?
>
>
>
> This is what the .inp file should look like for a packaged single zone
> system:
>
>
>
> "EL1 Sys1 (PTAC) (G.SSW1)" = SYSTEM
>
>    TYPE             = PSZ
>
>    HEAT-SOURCE      = HEAT-PUMP
>
>    ZONE-HEAT-SOURCE = NONE
>
>    SIZING-RATIO     = 1
>
>    COOL-SIZING-RATI = 1
>
>    MIN-SUPPLY-T     = 58
>
>    FAN-SCHEDULE     = "S1 Sys1 (PTAC) Fan Sch"
>
>    CW-LOOP          = "DEFAULT-CW"
>
>    COOLING-CAPACITY = 15752
>
>    COOL-SH-CAP      = 11839
>
>    HP-SUPP-SOURCE   = NONE
>
>    FURNACE-HIR      = 1.24067
>
>    CONTROL-ZONE     = "EL1 SSW Perim Zn (G.SSW1)"
>
>    C-EER95          = 8.24
>
>    C-COP47          = 0.78
>
>    C-AFUE           = 0.78
>
>    C-SF-MTR-TYPE    = 1
>
>    C-RF-MTR-TYPE    = 1
>
>    C-OSA-DMPR-CTRL  = 1
>
>    C-HTG-DUCT-LOCN  = *Ceiling Plenum*
>
>    C-HTG-DUCT-RVAL  = 7
>
>    C-CLG-DUCT-LOCN  = *Ceiling Plenum*
>
>    C-CLG-DUCT-RVAL  = 7
>
>    C-CLG-CAP-CATEG  = 14
>
>
>
> For my next system, everything would be exactly the same except the
> highlighted lines (and so on for all 233 systems):
>
>
>
> "EL1 Sys1 (PTAC) (G.W2)" = SYSTEM
>
>    TYPE             = PSZ
>
>    HEAT-SOURCE      = HEAT-PUMP
>
>    ZONE-HEAT-SOURCE = NONE
>
>    SIZING-RATIO     = 1
>
>    COOL-SIZING-RATI = 1
>
>    MIN-SUPPLY-T     = 58
>
>    FAN-SCHEDULE     = "S1 Sys1 (PTAC) Fan Sch"
>
>    CW-LOOP          = "DEFAULT-CW"
>
>    COOLING-CAPACITY = 15752
>
>    COOL-SH-CAP      = 11839
>
>    HP-SUPP-SOURCE   = NONE
>
>    FURNACE-HIR      = 1.24067
>
>    CONTROL-ZONE     = "EL1 Sys1 (PTAC) (G.W2)"
>
>    C-EER95          = 8.24
>
>    C-COP47          = 0.78
>
>    C-AFUE           = 0.78
>
>    C-SF-MTR-TYPE    = 1
>
>    C-RF-MTR-TYPE    = 1
>
>    C-OSA-DMPR-CTRL  = 1
>
>    C-HTG-DUCT-LOCN  = *Ceiling Plenum*
>
>    C-HTG-DUCT-RVAL  = 7
>
>    C-CLG-DUCT-LOCN  = *Ceiling Plenum*
>
>    C-CLG-DUCT-RVAL  = 7
>
>    C-CLG-CAP-CATEG  = 14
>
>
>
>
>
> thank you,
>
>
>
> Jesse Phillips | Energy Engineer
>
>
>
>
>
>
> _______________________________________________
> Equest-users mailing list
> http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org
> To unsubscribe from this mailing list send  a blank message to
> EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG
>
>
>
>
>
>
>
>
>
> _______________________________________________
>
> Equest-users mailing list
>
> http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org
>
> To unsubscribe from this mailing list send  a blank message to EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG
>
>
> ------------------------------
>
> You are receiving this communication because you are listed as a current
> WSP contact. Should you have any questions regarding WSP’s electronic
> communications policy, please consult our Anti-Spam Commitment
> www.wspgroup.com/casl. For any concern or if you believe you should not
> be receiving this message, please forward this message to us at
> caslcompliance at wspgroup.com so that we can promptly address your request.
> This message is intended only for the use of the individual or entity to
> which it is addressed, and may contain information which is privileged,
> confidential, proprietary or exempt from disclosure under applicable law.
> If you are not the intended recipient or the person responsible for
> delivering the message to the intended recipient, you are strictly
> prohibited from disclosing, distributing, copying or in any way using this
> message. If you have received this communication in error, please notify
> the sender, and destroy and delete any copies you may have received.
>
> WSP provides professional land surveying services through the following
> entities: WSP Surveys (AB) Limited Partnership and WSP Surveys (BC) Limited
> Partnership
>
> _______________________________________________
> Equest-users mailing list
> http://lists.onebuilding.org/listinfo.cgi/equest-users-onebuilding.org
> To unsubscribe from this mailing list send  a blank message to
> EQUEST-USERS-UNSUBSCRIBE at ONEBUILDING.ORG
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150911/a15f5b7c/attachment-0005.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6574 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150911/a15f5b7c/attachment-0005.png>


More information about the Equest-users mailing list