First time here? Check out the Help page!
1 | initial version |
The following, will set the X coordinate of the reference point to 0:
daylgtctrl = idf_file.idfobjects["Daylighting:ReferencePoint".upper()][0]
daylgtctrl.XCoordinate_of_Reference_Point = 0
Will give you
Daylighting:ReferencePoint,
Core_Retail_DaylRefPt1, !- Name
Core_Retail, !- Zone Name
0, !- XCoordinate of Reference Point
14.2, !- YCoordinate of Reference Point
0.0; !- ZCoordinate of Reference Point
2 | No.2 Revision |
The following, following will set the X coordinate of the reference point to 0:
daylgtctrl = idf_file.idfobjects["Daylighting:ReferencePoint".upper()][0]
daylgtctrl.XCoordinate_of_Reference_Point = 0
Will give you
Daylighting:ReferencePoint,
Core_Retail_DaylRefPt1, !- Name
Core_Retail, !- Zone Name
0, !- XCoordinate of Reference Point
14.2, !- YCoordinate of Reference Point
0.0; !- ZCoordinate of Reference Point
3 | No.3 Revision |
The following will set the X coordinate of the reference point to 0:
daylgtctrl = idf_file.idfobjects["Daylighting:ReferencePoint".upper()][0]
daylgtctrl.XCoordinate_of_Reference_Point = 0
Will give youyou:
Daylighting:ReferencePoint,
Core_Retail_DaylRefPt1, !- Name
Core_Retail, !- Zone Name
0, !- XCoordinate of Reference Point
14.2, !- YCoordinate of Reference Point
0.0; !- ZCoordinate of Reference Point
4 | No.4 Revision |
The following will set the X coordinate of the reference point to 0:
daylgtctrl = idf_file.idfobjects["Daylighting:ReferencePoint".upper()][0]
daylgtctrl.XCoordinate_of_Reference_Point = 0
Will give you:
Daylighting:ReferencePoint,
Core_Retail_DaylRefPt1, !- Name
Core_Retail, !- Zone Name
0, !- XCoordinate of Reference Point
14.2, !- YCoordinate of Reference Point
0.0; !- ZCoordinate of Reference Point
You can also know what the fields of an object are by using .fieldnames
:
daylgtctrl.fieldnames
Will give you:
['key',
'Name',
'Zone_Name',
'XCoordinate_of_Reference_Point',
'YCoordinate_of_Reference_Point',
'ZCoordinate_of_Reference_Point']
If you know the index of the field, you can use it instead of its name as such:
daylgtctrl[daylgtctrl.fieldnames[3]] = 0
Will also give you:
Daylighting:ReferencePoint,
Core_Retail_DaylRefPt1, !- Name
Core_Retail, !- Zone Name
0, !- XCoordinate of Reference Point
14.2, !- YCoordinate of Reference Point
0.0; !- ZCoordinate of Reference Point
5 | No.5 Revision |
The following will set the X coordinate of the reference point to 0:
daylgtctrl = idf_file.idfobjects["Daylighting:ReferencePoint".upper()][0]
daylgtctrl.XCoordinate_of_Reference_Point = 0
Will give you:
Daylighting:ReferencePoint,
Core_Retail_DaylRefPt1, !- Name
Core_Retail, !- Zone Name
0, !- XCoordinate of Reference Point
14.2, !- YCoordinate of Reference Point
0.0; !- ZCoordinate of Reference Point
You can also know what the fields get all field names of an object are by using .fieldnames
:
daylgtctrl.fieldnames
Will give you:
['key',
'Name',
'Zone_Name',
'XCoordinate_of_Reference_Point',
'YCoordinate_of_Reference_Point',
'ZCoordinate_of_Reference_Point']
If you know the index of the field, you can use it instead of its name as such:
daylgtctrl[daylgtctrl.fieldnames[3]] = 0
Will also give you:
Daylighting:ReferencePoint,
Core_Retail_DaylRefPt1, !- Name
Core_Retail, !- Zone Name
0, !- XCoordinate of Reference Point
14.2, !- YCoordinate of Reference Point
0.0; !- ZCoordinate of Reference Point