use_idd {eplusr} | R Documentation |
Use a specific EnergyPlus Input Data Dictionary (IDD) file
Description
Use a specific EnergyPlus Input Data Dictionary (IDD) file
Usage
use_idd(idd, download = FALSE, encoding = "unknown")
download_idd(ver = "latest", dir = ".")
avail_idd()
is_avail_idd(ver)
Arguments
idd |
Either a path, a connection, or literal data (either a single
string or a raw vector) to an EnergyPlus Input Data Dictionary (IDD)
file, usually named as |
download |
If |
encoding |
The file encoding of input IDD. Should be one of |
ver |
A valid EnergyPlus version, e.g. |
dir |
A directory to indicate where to save the IDD file. Default: current working directory. |
Details
use_idd()
takes a valid version or a path of an EnergyPlus Input Data
Dictionary (IDD) file, usually named "Energy+.idd" and return an Idd
object. For details on Idd
class, please see Idd.
download_idd()
downloads specified version of EnergyPlus IDD file from
EnergyPlus GitHub Repository. It is
useful in case where you only want to edit an EnergyPlus Input Data File
(IDF) directly but do not want to install whole EnergyPlus software.
avail_idd()
returns versions of all cached Idd
object.
is_avail_idd()
returns TRUE
if input version of IDD file has been parsed
and cached.
eplusr tries to detect all installed EnergyPlus in default installation
locations when loading. If argument idd
is a version, eplusr will try the
follow ways sequentially to find corresponding IDD:
The cached
Idd
object of that version-
"Energy+.idd"
file distributed with EnergyPlus of that version (seeavail_eplus()
). The
"VX-Y-Z-Energy+.idd"
file distributed along with IDFVersionUpdater from the latest EnergyPlus detected.
Value
-
use_idd()
returns anIdd
object -
download_idd()
returns an invisible integer0
if succeed. Also an attribute namedfile
which is the full path of the downloaded IDD file; -
avail_idd()
returns a numeric_version vector orNULL
if no available Idd object found. -
is_avail_idd()
returns a single logical vector.
Author(s)
Hongyuan Jia
See Also
Idd Class for parsing, querying and making modifications to EnergyPlus IDD file
Examples
## Not run:
# get all available Idd version
avail_idd()
# check if specific version of Idd is available
is_avail_idd("8.5")
# download latest IDD file from EnergyPlus GitHub repo
str(download_idd("latest", tempdir()))
# use specific version of Idd
# only works if EnergyPlus v8.8 has been found or Idd v8.8 exists
use_idd("8.8")
# If Idd object is currently not avail_idd, automatically download IDD file
# from EnergyPlus GitHub repo and parse it
use_idd("8.8", download = "auto")
# now Idd v8.8 should be available
is_avail_idd("8.8")
# get specific version of parsed Idd object
use_idd("8.8")
avail_idd() # should contain "8.8.0"
## End(Not run)