def theidfobject(idfindex, keyindex, objindex):
idf, edges = eppystuff.an_idfedges(idfindex)
objkeys = idf_helpers.idfobjectkeys(idf)
objkey = objkeys[keyindex]
idfobjects = idf.idfobjects[objkey]
idfobject = idfobjects[objindex]
fields = idfobject.objls
values = idfobject.obj
valuesfields = [(value, field) for value, field in zip(values, fields)]
urls = ["%s/%s" % (objindex, field) for field in fields]
linktags = ['<a href=%s>%s %s %s</a>' % (url, i, abullet, value,)
for i, (url, value) in enumerate(zip(urls, values))]
iddinfos = ['<a href=%s/iddinfo>%s</a>' % (url, '?')
for url in urls]
lines = ["%s %s %s %s %s" % (linktag, aspace, field, abullet, iddinfo)
for linktag, field, iddinfo in zip(linktags, fields, iddinfos)]
# ---
lines.pop(0)
url = 'showlinks/%s' % (objindex, )
showlinkslink = '<a href=%s>show links to other objects</a>' % (url, )
url = 'nodementions/%s' % (objindex, )
showmentionslink = '<a href=%s>show node connections</a> <hr>' % (url, )
url = 'objfunctions/%s' % (objindex, )
objfunctionslink = '<hr> <a href=%s>run functions of this object</a>' % (url, )
lines.append(objfunctionslink)
url = 'refferingobjs/%s' % (objindex, )
refferingobjslink = '<a href=%s>Show objects that refer to this object</a> ->this runs slow :-(' % (url, )
lines.append(refferingobjslink)
url = 'mentioningobjs/%s' % (objindex, )
mentioningobjslink = '<a href=%s>Show objects that mention this object</a>' % (url, )
lines.append(mentioningobjslink)
# - hvac links
url = 'hvacprevnext/%s' % (objindex, )
hvacprevnextlink = 'HVAC object in loop -> <a href=%s>prev objects & next objects</a>' % (url, )
lines.append(hvacprevnextlink)
# -
heading = '%s <a href=%s/key/iddinfo> %s</a>' % (objkey, objindex, '?')
headingdoc = '<a href="%s" target="_blank">docs</a>' % (getdoclink(objkey.upper()))
headingwithdoc = '%s (%s)' % (heading, headingdoc)
lineswithtitle = [headingwithdoc, "=" * len(objkey)] + lines
lineswithtitle.insert(0, showmentionslink)
lineswithtitle.insert(0, showlinkslink)
lineswithtitle = putfilenameontop(idf, lineswithtitle)
html = '<br>'.join(lineswithtitle)
return html
评论列表
文章目录