Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

SketchUp Measure Multiplier to Selected Thermal Zones

I am attempting to write a Sketchup Measure that takes the selected Thermal Zones and applies a Multiplier to them from a user input.

The code is below but I am having two problems:

  • I am getting an end-of-file error that I can't figure out.
  • Defining the multiplier to the thermal zone is not working. I don't believe my method is correct.

My code can be found here GitHub

SketchUp Measure Multiplier to Selected Thermal Zones

I am attempting to write a Sketchup Measure that takes the selected Thermal Zones and applies a Multiplier to them from a user input.

The code is below but I am having two problems:

  • I am getting an end-of-file error that I can't figure out.
  • Defining the multiplier to the thermal zone is not working. I don't believe my method is correct.

I iterate through each thermal zone and try to override the multiplier using:

thermal_zone.multiplier = 2

Is this the correct method or does it operate more like:

thermal_zone.multiplier(2)

My code can be found here GitHub

SketchUp Measure Multiplier to Selected Thermal Zones

I am attempting to write a Sketchup Measure that takes the selected Thermal Zones and applies a Multiplier to them from a user input.

The code is below but I am having two problems:

  • (Solved) I am getting an end-of-file error that I can't figure out.out.
    • I discovered that a next if does not require an end.
  • Defining the multiplier to the thermal zone is not working. I don't believe my method is correct.

I iterate through each thermal zone and try to override the multiplier using:

thermal_zone.multiplier = 2

Is this the correct method or does it operate more like:

thermal_zone.multiplier(2)

I have also tried:

thermal_zone.setMultiplier(2)

My code can be found here GitHub

SketchUp Measure Multiplier to Selected Thermal Zones

I am attempting to write a Sketchup Measure that takes the selected Thermal Zones and applies a Multiplier to them from a user input.

The code is below but I am having two problems:

  • (Solved) I am getting an end-of-file error that I can't figure out.
    • I discovered that a next if does not require an end.
  • Defining the multiplier to the thermal zone is not working. I don't believe my method is correct.

I iterate through each thermal zone and try to override the multiplier using:

thermal_zone.multiplier = 2

Is this the correct method or does it operate more like:

thermal_zone.multiplier(2)

I have also tried:

thermal_zone.setMultiplier(2)

My code can be found here GitHub

EDIT 10/15/2019

The script is now working and can be found at the above GitHub link. The solution was a combination of factors. @Julien's answer below helped find several errors and troubleshoot.

The biggest mistake was that it doesn't appear the runner.isSelection() works on thermal zones in SketchUp as the interface is highlighting spaces, not thermal zones.

Instead, I had to use the runner.isSelection() on a space and then get the thermal zone for that space. After getting the thermal zone I could use the .setMultiplier(int) function that @Julian highlighted.

SketchUp Measure Multiplier to Selected Thermal Zones

I am attempting to write a Sketchup Measure that takes the selected Thermal Zones and applies a Multiplier to them from a user input.

The code is below but I am having two problems:

  • (Solved) I am getting an end-of-file error that I can't figure out.
    • I discovered that a next if does not require an end.
  • Defining the multiplier to the thermal zone is not working. I don't believe my method is correct.

I iterate through each thermal zone and try to override the multiplier using:

thermal_zone.multiplier = 2

Is this the correct method or does it operate more like:

thermal_zone.multiplier(2)

I have also tried:

thermal_zone.setMultiplier(2)

My code can be found here GitHub

EDIT 10/15/2019

The script is now working and can be found at the above GitHub link. The solution was a combination of factors. @Julien's @Julien Marrec answer below helped find several errors and troubleshoot.

The biggest mistake was that it doesn't appear the runner.isSelection() works on thermal zones in SketchUp as the interface is highlighting spaces, not thermal zones.

Instead, I had to use the runner.isSelection() on a space and then get the thermal zone for that space. After getting the thermal zone I could use the .setMultiplier(int) function that @Julian @Julien Marrec highlighted.

SketchUp Measure Multiplier to Selected Thermal Zones

I am attempting to write a Sketchup Measure that takes the selected Thermal Zones and applies a Multiplier to them from a user input.

The code is below but I am having two problems:

  • (Solved) I am getting an end-of-file error that I can't figure out.
    • I discovered that a next if does not require an end.
  • Defining the multiplier to the thermal zone is not working. I don't believe my method is correct.

I iterate through each thermal zone and try to override the multiplier using:

thermal_zone.multiplier = 2

Is this the correct method or does it operate more like:

thermal_zone.multiplier(2)

I have also tried:

thermal_zone.setMultiplier(2)

My code can be found here GitHub

EDIT 10/15/2019

The script is now working and can be found at the above GitHub link. The solution was a combination of factors. @Julien Marrec answer below helped find several errors and troubleshoot.

The biggest mistake was that it doesn't appear the runner.isSelection() works on thermal zones in SketchUp as the interface is highlighting spaces, not thermal zones.

Instead, I had to use the runner.isSelection() on a space and then get the thermal zone for that space. After getting the thermal zone I could use the .setMultiplier(int) function that @Julien Marrec highlighted.