1 | initial version |
@Camille, you made a string in your run measure, but you need to add code that makes a workspace out of it. Add the code below before the return true
. Also ruby variables should start with lowercase character so change Instruction
to instruction
idfObject = OpenStudio::IdfObject::load(instruction)
object = idfObject.get
wsObject = workspace.addObject(object)
new_object = wsObject.get
Optionally you can add an info message that spits back the name
runner.registerInfo("An object named '#{new_object.getString(0)}' was added.")
2 | No.2 Revision |
@Camille, you made a string in your run measure, but you need to add code that makes a workspace out of it. object from the string. Add the code below before the return true
. Also ruby variables should start with lowercase character so change Instruction
to instruction
idfObject = OpenStudio::IdfObject::load(instruction)
object = idfObject.get
wsObject = workspace.addObject(object)
new_object = wsObject.get
Optionally you can add an info message that spits back the name
runner.registerInfo("An object named '#{new_object.getString(0)}' was added.")
3 | No.3 Revision |
@Camille, you made a string in your run measure, but you need to add code that makes a workspace object from the string. Add the code below before the return true
. Also ruby variables should start with lowercase character so change Instruction
to instruction
idfObject = OpenStudio::IdfObject::load(instruction)
object = idfObject.get
wsObject = workspace.addObject(object)
new_object = wsObject.get
Optionally you can add an info message that spits back the name
runner.registerInfo("An object named '#{new_object.getString(0)}' was added.")
Then repeat this code with a new string for the additional object that @Archmage mentioned in his answer.
4 | No.4 Revision |
@Camille, you made a string in your run measure, method, but you need to add code that makes a workspace object from the string. Add the code below before the return true
. Also ruby variables should start with lowercase character so change Instruction
to instruction
idfObject = OpenStudio::IdfObject::load(instruction)
object = idfObject.get
wsObject = workspace.addObject(object)
new_object = wsObject.get
Optionally you can add an info message that spits back the name
runner.registerInfo("An object named '#{new_object.getString(0)}' was added.")
Then repeat this code with a new string for the additional object that @Archmage mentioned in his answer.
5 | No.5 Revision |
@Camille, you made a string in your run method, but you need to add code that makes a workspace object from the string. Add the code below before the return true
. Also ruby variables should start with lowercase character so change Instruction
to instruction
idfObject = OpenStudio::IdfObject::load(instruction)
object = idfObject.get
wsObject = workspace.addObject(object)
new_object = wsObject.get
Optionally you can add an info message that spits back the name
runner.registerInfo("An object named '#{new_object.getString(0)}' was added.")
Then repeat this code with a new string for the additional object that @Archmage mentioned in his answer.
Update:
@Camille, in your answer you asked about the difference between an OpenStudio and EnergyPlus measure. For some background look at the digram below. The OSM is the working format for an OpenStudio model. It is what users typically work with, but it isn't what EnergyPlus needs; so prior to running a simulation we convert the OSM file to an IDF file and hand that off to EnergyPlus. If a user needs to model something, like room air models, that EnergyPlus supports but OpenStudio doesn't, an EnergyPlus measure, which is run after translation to IDF but before it is handed to EnergyPlus, will support this. The diagram also shows a third kind of measure, called a reporting measure that runs AfterEnergyPlus has run the simulation. It has access to the SQL file, the final OSM, and the final IDF. The reporting measure does have one method that runs prior to the simulation to inject output variable requests that it will need.