[Equest-users] script language to change lighting schedule

Byron Burns B.Burns at ha-inc.com
Thu Mar 26 14:24:04 PDT 2015


I always have to refer back to the help files within eQUEST to get it figured out.  The excerpt below is from Volume 3: Topics > Building Description Language > Keyword Expressions

BDL Functions
BDL functions are functions that can be used to obtain information about a BDL object that can be used in an expression.  This information can be of symbolic or numeric type.  BDL functions available for use in creating an expression are presented in alphabetical order below.  Note that BDL functions are not case sensitive.
Function

Description

CalcAz or #CA

Returns the azimuth calculated for a POLYGON segment.

CalcDegN or #CDN

Calculates the facing direction of a component based on an azimuth and tilt.

DayOfWeek or #DOW

Returns an integer index of the day of week.

Error or #E

Registers a BDL error. No return value.

Global or #G

Returns the value of a BDL global command/keyword.

Local or #L

Returns the value of a local keyword.

LocalStatus or #LST

Return the BDL "status" value of a local Keyword

LocalSym or #LS

Returns the BDL symbol table index for the symbol entry of the local component.

LocalRef or #LR

Returns the value of a keyword in a command referenced by a local keyword.

LocalRefStatus or #LRST

Returns the BDL "status" value of a keyword in a command referenced by a local keyword.

MirrorPolygon or #MP

Returns the BDL symbol table index for the symbol entry of the mirror of a POLYGON.

Parameter or #PA

Returns the value of a BDL-defined PARAMETER given its text string.

Parent or #P

Returns the value of a parent keyword.

Parent2 or #P2

Returns the value of a grand parent keyword.

Parent3 or #P3

Returns the value of a great grand parent keyword.

ParentStatus or #PST

Returns the BDL "status" value of a parent keyword.

Parent2Status or #P2ST

Returns the BDL "status" value of a grand parent keyword.

Parent3Status or #P3ST

Returns the BDL "status" value of a great grand parent keyword.

ParentSym or #PS

Returns the BDL symbol table index for the symbol entry of parent of the local component.

Parent2Sym or #P2S

Returns the BDL symbol table index for the symbol entry of grandparent of the local component.

Parent3Sym or #P3S

Returns the BDL symbol table index for the symbol entry of greatgrandparent of the local component.

ParentRef or #PR

Returns the value of a keyword in a command referenced by a parent keyword.

Parent2Ref or #P2R

Returns the value of a keyword in a command referenced by a grandparent keyword.

Parent3Ref or #P3R

Returns the value of a keyword in a command referenced by a great-grandparent keyword.

ParentRefStatus or #PRST

Returns the BDL "status" value of a keyword in a command referenced by a parent keyword.

Parent2RefStatus or #P2RT

Returns the BDL "status" value of a keyword in a command referenced by a grandparent keyword.

Parent3RefStatus or #P3RT

Returns the BDL "status" value of a keyword in a command referenced by a great-grandparent keyword.

RefIndex or #RI

Returns the BDL reference table index for the symbol which this expression defines.

SymIndex or #SI

Returns the BDL symbol table index for a given symbol.

SymValue or #SV

Returns the BDL symbol table value of the symbol in the given BDL symbol table entry position.

ResVal or #RV

Specifies whether the argument is required, unused, has no default, or is unfilled.




Byron D. Burns, EIT, BEMP
Energy Engineer, Building Sciences Studio

H&A | Hankins & Anderson | www.ha-inc.com<http://www.ha-inc.com>
d: (804) 420-1622 p: (804) 285-4171 f: (804) 217-8520

From: Wang, Liao [mailto:Liao.Wang at wspgroup.com]
Sent: Thursday, March 26, 2015 5:19 PM
To: Byron Burns; equest-users at lists.onebuilding.org
Subject: RE: script language to change lighting schedule

Thanks Byron,

Can you explain what these command mean: #L("A"), #SI("A","B","C") ? Thanks!

From: Byron Burns [mailto:B.Burns at ha-inc.com]
Sent: Thursday, March 26, 2015 5:17 PM
To: Wang, Liao; equest-users at lists.onebuilding.org<mailto:equest-users at lists.onebuilding.org>
Subject: RE: script language to change lighting schedule

Try this, you will need to change the name of the schedules and c-activity-desc.

   LIGHTING-SCHEDUL = (
{if(#L("ZONE-TYPE")== #SI("CONDITIONED","SPACE","ZONE-TYPE")) then
               switch(#L("C-ACTIVITY-DESC"))
               case "off1": #SI("off1 - office open InsLt Sch","SPACE","LIGHTING-SCHEDUL")
               case "off3": #SI("off3 - 24 hour InsLt Sch","SPACE"," LIGHTING-SCHEDUL ")
               case "caf1": #SI("Cafeteria Light","SPACE"," LIGHTING-SCHEDUL ")
    case "dat1": #SI("Mech/Elec/Com Light","SPACE"," LIGHTING-SCHEDUL ")
               case "mec1": #SI("Mech/Elec/Com Light","SPACE"," LIGHTING-SCHEDUL ")
               case "war1": #SI("off1 - office open InsLt Sch","SPACE"," LIGHTING-SCHEDUL ")
               case "bay1": #SI("off1 - office open InsLt Sch","SPACE"," LIGHTING-SCHEDUL ")
               case "dumm": unused
               default: #SI("off1 - office open InsLt Sch","SPACE"," LIGHTING-SCHEDUL ")
                              endswitch
               else
                              unused
               endif
               } )


Byron D. Burns, EIT, BEMP
Energy Engineer, Building Sciences Studio

H&A | Hankins & Anderson | www.ha-inc.com<http://www.ha-inc.com>
d: (804) 420-1622 p: (804) 285-4171 f: (804) 217-8520
From: Equest-users [mailto:equest-users-bounces at lists.onebuilding.org] On Behalf Of Wang, Liao
Sent: Thursday, March 26, 2015 5:10 PM
To: equest-users at lists.onebuilding.org<mailto:equest-users at lists.onebuilding.org>
Subject: [Equest-users] script language to change lighting schedule

Hi,

I'd like to know how to define lighting schedule using "user-defined default expression"? For instance, I'd like to change lighting schedule for all apartments to "LT_APT", what's the exact script I should use? I've tried something like:
Switch(#L("C-ACTIVITY-DESC"))
Case "APT": "LIGHTING-SCHEDUL"="LT_APT"
Endswitch

But I'm sure there are some errors in my script, especially the underlined portion...Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/equest-users-onebuilding.org/attachments/20150326/9a4faf94/attachment.htm>


More information about the Equest-users mailing list