First time here? Check out the Help page!
1 | initial version |
Use model.getShadingControls
which will return an array of your shading controls.
Example: set all Shading Control's setpoint to 250:
model.getShadingControls.each do |sc|
sc.setSetpoint(250)
end
2 | No.2 Revision |
Use model.getShadingControls
which will return an array of your shading controls.
Example: set all Shading Control's setpoint to 250:
model.getShadingControls.each do |sc|
sc.setSetpoint(250)
end
Note that this is true of all objects in the OS API. If you want to get all Constructions in the model: model.getConstructions
, etc.
3 | No.3 Revision |
Use model.getShadingControls
which will return an array of your shading controls.
Example: set all Shading Control's setpoint to 250:
model.getShadingControls.each do |sc|
sc.setSetpoint(250)
end
Note that this is true of all objects in the OS API. If you want to get all Constructions in the model: model.getConstructions
, etc.
Side note:
FYI, if you decompose your command call (always a good idea), you'll see that your problem is with ("ShadingControl".to_IddObjectType)
. This does work: model.getObjectsByType("OS_ShadingControl".to_IddObjectType)
but it'll return an array of WorkspaceObject
, that you'll have to cast to their actual object type (x.to_ShadingControl.get
). Bottom line: use model.getShadingControls
!
4 | No.4 Revision |
Use model.getShadingControls
which will return an array of your shading controls.
Example: set all Shading Control's setpoint to 250:
model.getShadingControls.each do |sc|
sc.setSetpoint(250)
end
Note that this is true of all objects in the OS API. If you want to get all Constructions in the model: model.getConstructions
, etc.
Side note:
FYI, if you decompose your command call (always a good idea), you'll see that your problem is with ("ShadingControl".to_IddObjectType)
. This does work:
model.getObjectsByType("OS_ShadingControl".to_IddObjectType)model.getObjectsByType("OS_ShadingControl".to_IddObjectType)
but it'll return an array of WorkspaceObject
, that you'll have to cast to their actual object type (x.to_ShadingControl.get
). ).
Bottom line: use model.getShadingControls
!