当前位置: 首页>>代码示例>>Python>>正文


Python IDF.printidf方法代码示例

本文整理汇总了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>
开发者ID:eayoungs,项目名称:eppy,代码行数:33,代码来源:Main_Tutorial.py

示例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()
开发者ID:santoshphilip,项目名称:eppy,代码行数:32,代码来源:mcve.py

示例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  
开发者ID:Nobatek,项目名称:eppy,代码行数:33,代码来源:newfunctions.py

示例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()
开发者ID:Nobatek,项目名称:eppy,代码行数:32,代码来源:newfile.py


注:本文中的eppy.modeleditor.IDF.printidf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。