本文整理汇总了Python中eppy.modeleditor.IDF.printidf方法的典型用法代码示例。如果您正苦于以下问题:Python IDF.printidf方法的具体用法?Python IDF.printidf怎么用?Python IDF.printidf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eppy.modeleditor.IDF
的用法示例。
在下文中一共展示了IDF.printidf方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: IDF
# 需要导入模块: from eppy.modeleditor import IDF [as 别名]
# 或者: from eppy.modeleditor.IDF import printidf [as 别名]
fname1 = "../eppy/resources/idffiles/V_7_2/smallfile.idf"
# <codecell>
IDF.setiddname(iddfile)
idf1 = IDF(fname1)
# <markdowncell>
# idf1 now holds all the data to your in you idf file.
#
# Now that the behind-the-scenes work is done, we can print this file.
# <codecell>
idf1.printidf()
# <markdowncell>
# Looks like the same file as before, except that all the comments are slightly different.
# <markdowncell>
# As you can see, this file has four objects:
#
# - VERSION
# - SIMULATIONCONTROL
# - BUILDING
# - SITE:LOCATION
# <markdowncell>
示例2: IDF
# 需要导入模块: from eppy.modeleditor import IDF [as 别名]
# 或者: from eppy.modeleditor.IDF import printidf [as 别名]
BuildingSurface:Detailed,
z2 Roof 0001, !- Name
Roof, !- Surface Type
, !- Construction Name
Thermal Zone 2, !- Zone Name
Outdoors, !- Outside Boundary Condition
, !- Outside Boundary Condition Object
SunExposed, !- Sun Exposure
WindExposed, !- Wind Exposure
, !- View Factor to Ground
, !- Number of Vertices
0.0, !- Vertex 1 Xcoordinate
0.0, !- Vertex 1 Ycoordinate
1.458, !- Vertex 1 Zcoordinate
0.0, !- Vertex 2 Xcoordinate
2.9, !- Vertex 2 Ycoordinate
1.458, !- Vertex 2 Zcoordinate
-2.14, !- Vertex 3 Xcoordinate
2.9, !- Vertex 3 Ycoordinate
1.458, !- Vertex 3 Zcoordinate
-2.14, !- Vertex 4 Xcoordinate
0.0, !- Vertex 4 Ycoordinate
1.458; !- Vertex 4 Zcoordinate
"""
idf = IDF()
idf.initreadtxt(idftxt)
idf.outputtype = 'compressed'
idf.printidf()
示例3: IDF
# 需要导入模块: from eppy.modeleditor import IDF [as 别名]
# 或者: from eppy.modeleditor.IDF import printidf [as 别名]
# - Save it to the disk
#
# Here are the steps to do that
# <codecell>
# some initial steps
from eppy.modeleditor import IDF
iddfile = "../eppy/resources/iddfiles/Energy+V7_2_0.idd"
# IDF.setiddname(iddfile) # Has already been set
# - Let us first open a file from the disk
fname1 = "../eppy/resources/idffiles/V_7_2/smallfile.idf"
idf_fromfilename = IDF(fname1) # initialize the IDF object with the file name
idf_fromfilename.printidf()
# <codecell>
# - now let us open a file from the disk differently
fname1 = "../eppy/resources/idffiles/V_7_2/smallfile.idf"
fhandle = open(fname1, 'r') # open the file for reading and assign it a file handle
idf_fromfilehandle = IDF(fhandle) # initialize the IDF object with the file handle
idf_fromfilehandle.printidf()
# <codecell>
# So IDF object can be initialized with either a file name or a file handle
# - How do I create a blank new idf file
示例4: StringIO
# 需要导入模块: from eppy.modeleditor import IDF [as 别名]
# 或者: from eppy.modeleditor.IDF import printidf [as 别名]
# if you have not done so, uncomment the following three lines
import sys
# pathnameto_eppy = 'c:/eppy'
pathnameto_eppy = '../../'
sys.path.append(pathnameto_eppy)
from eppy import modeleditor
from eppy.modeleditor import IDF
iddfile = "../resources/iddfiles/Energy+V7_2_0.idd"
IDF.setiddname(iddfile)
idftxt = "" # empty string
from io import StringIO
fhandle = StringIO(idftxt) # we can make a file handle of a string
new_idf = IDF(fhandle) # initialize the IDF object with the file handle
# add an object to the idf file
objtype = "BUILDING"
new_idf.newidfobject(objtype, Name="Taj Mahal")
buildings = new_idf.idfobjects["BUILDING"]
building = buildings[0]
# print building
new_idf.newidfobject("LIGHTS", Name="light one")
lights = new_idf.idfobjects["LIGHTS"]
light = lights[0]
print(light)
new_idf.printidf()