Overview

The Medeek Wall API allows developers and advanced users to programmatically create and manipulate Medeek Wall assemblies inside SketchUp using Ruby. Additionally specific sub-assemblies within wall assemblies can be added, modified, queried, and deleted (ie. doors, windows, garage doors and columns).

All public API methods are accessed through the following modules and classes:

Medeek_Engineering_Inc_Extensions::
  MedeekWallPlugin::
  Wall::
  MedeekMethods


wall_draw

Creates a new wall assembly between two points.

Syntax

wall_draw(pt0, pt1, wallfamily = 'Rectangular', walltype = 'Int-Ext')

Parameters

  • pt0 - Start point (Geom::Point3d or [x,y,z])
  • pt1 - End point (Geom::Point3d or [x,y,z])
  • wallfamily - 'Rectangular', 'Gable', 'Shed', or 'Hip'
  • walltype - 'Int-Ext' or 'Int-Int'

Examples:

mod = Medeek_Engineering_Inc_Extensions::
      MedeekWallPlugin::
      Wall::
      MedeekMethods

mod.wall_draw([0,0,0],[240,0,0],'Rectangular','Int-Ext')
# Create an octagon wall layout

mod = Medeek_Engineering_Inc_Extensions::
      MedeekWallPlugin::
      Wall::
      MedeekMethods

mod.wall_draw([104,48,0],[184,48,0])
mod.wall_draw([184,48,0],[240,104,0])
mod.wall_draw([240,104,0],[240,184,0])
mod.wall_draw([240,184,0],[184,240,0])
mod.wall_draw([184,240,0],[104,240,0])
mod.wall_draw([104,240,0],[48,184,0])
mod.wall_draw([48,184,0],[48,104,0])
mod.wall_draw([48,104,0],[104,48,0])

validate_medeekwall

Validates that the provided group represents a Medeek Wall assembly.

Syntax

validate_medeekwall(group)

Parameters

  • group - Wall group name or SketchUp group object

Returns

  • true, group - valid Medeek wall group
  • false - invalid object

Example

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.validate_medeekwall('RECT_WALL_ASSEMBLY_2024110823301222')

wall_move

Moves a Medeek Wall assembly perpendicular to its length.

Syntax

wall_move(group, deltay)

Parameters

  • group - Wall group name or SketchUp group object
  • deltay - Offset distance

Example

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_move('RECT_WALL_ASSEMBLY_2024110823301222', 48.0)

wall_regen

Regenerates an existing Medeek Wall assembly.

Syntax

wall_regen(group)

Parameters

  • group - Wall group name or SketchUp group object

Example

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_regen('RECT_WALL_ASSEMBLY_2024110823301222')

wall_read_attributes

Reads the stored attributes from an existing Medeek Wall assembly. Since the attributes are stored in nested libraries the data is given as a hash of hashes.

Syntax

wall_read_attributes(group)

Parameters

  • group - Wall group name or SketchUp group object (optional)

Returns

  • A hash of wall attributes when the wall is valid
  • false or nil if the supplied object is not a valid Medeek Wall assembly

Example

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_read_attributes('RECT_WALL_ASSEMBLY_2024110823301222')

Notes

  • Use this method when you need to inspect all available wall settings/parameters.
  • Please read the attribute library index to understand what each parameter/attribute does with regards to the wall assembly.
  • This method is only intended for reading wall configuration data it does not alter the model or the wall assembly.
  • If no wall group name is supplied the selection set in the model will be analyzed to determine if a wall assembly has been selected.

wall_read_attribute

Reads a single stored attribute from an existing Medeek Wall assembly.

Syntax

wall_read_attribute(param, group)

Parameters

  • param - The name of the attribute/parameter to read
  • group - Wall group name or SketchUp group object (optional)

Returns

  • The current value of the requested attribute/parameter
  • false or nil if the supplied object is not a valid Medeek Wall assembly
  • nil if the requested attribute does not exist

Examples

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_read_attribute('CORNEROFFSET2')
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_read_attribute('CORNEROFFSET2', 'RECT_WALL_ASSEMBLY_2024110823301222')

Notes

  • This method is useful when querying one specific parameter without reading the entire wall attribute library.
  • This method is only intended for reading wall configuration data, it does not alter the model or the wall assembly.
  • If no wall group name is supplied the selection set in the model will be analyzed to determine if a wall assembly has been selected.

wall_set_attribute

Sets a single stored attribute within an existing Medeek Wall assembly.

Syntax

wall_set_attribute(param, value, group, regen = false)

Parameters

  • param - The name of the attribute/parameter to set
  • value - The new value to assign to the specified attribute/parameter
  • group - Wall group name or SketchUp group object (optional)
  • regen flag - Set to true or false in order to regen the assembly after the new value is set, default is false (optional)

Returns

  • true if the attribute was successfully updated
  • false or nil if the supplied object is not a valid Medeek Wall assembly
  • false if the requested attribute cannot be updated

Example

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_set_attribute('CORNEROFFSET2', 3.5)
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_set_attribute('CORNEROFFSET2', 3.5, true)
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_set_attribute('CORNEROFFSET2', 3.5, 'RECT_WALL_ASSEMBLY_2024110823301222')
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_set_attribute('CORNEROFFSET2', 3.5, 'RECT_WALL_ASSEMBLY_2024110823301222', true)

Notes

  • Use this method when you need to modify a single wall setting/parameter.
  • Please read the attribute library index to understand what each parameter/attribute does with regards to the wall assembly.
  • This method only updates the specified wall attribute/parameter, it does not automatically redraw or regenerate the wall assembly unless the regen flag is set to true.
  • If no wall group name is supplied the selection set in the model will be analyzed to determine if a wall assembly has been selected.

wall_win_draw

Creates a new window within a wall assembly at the specified distance/location along the wall.

Syntax

wall_win_draw(win_loc, win_width, win_height, win_geom = 'Rectangle', group = nil, win_install = 'YES', win_trim = 'YES', win_casing = 'YES')

Parameters

  • win_loc - Numeric value (inches) along the wall to locate the placement (center) of the window
  • win_width - Window width measured in inches
  • win_height - Window geometry, valid options are: Rectangle, Half Round, Arch, Gothic Arch, Oval, Octagaon, Hexagon, Trapezoid, Pentagon
  • group - Wall group name or SketchUp group object (optional)
  • win_install - Option to install the window unit in the window opening, 'YES' or 'NO' (optional)
  • win_trim - Option to install exterior trim around the window opening, 'YES' or 'NO' (optional)
  • win_casing - Option to install interior casing around the window opening, 'YES' or 'NO' (optional)

Examples:

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_win_draw(48.0, 36.0, 48.0)
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_win_draw(48.0, 60.0, 48.0, 'Rectangle', 'RECT_WALL_ASSEMBLY_2024110823301222', 'YES', 'NO', 'NO')

wall_win_read_attributes

Reads the stored attributes for a window from an existing Medeek Wall assembly. Since the attributes are stored in nested libraries the data is given as a hash of arrays.

Syntax

wall_win_read_attributes(window_group_name, group)

Parameters

  • window_group_name - Window group name, naming convention always follows this pattern: WINDOW1, WINDOW2, WINDOW3 etc...
  • group - Wall group name or SketchUp group object (optional)

Returns

  • A hash of window attributes when the wall and window is valid
  • false or nil if the supplied object is not a valid Medeek Wall assembly and the window does not exist

Example

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_win_read_attributes('WINDOW1')
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_win_read_attributes('WINDOW1', 'RECT_WALL_ASSEMBLY_2024110823301222')

Notes

  • Use this method when you need to inspect all available window settings/parameters.
  • Please read the window attribute library index to understand what each parameter/attribute does with regards to the window sub-assembly.
  • This method is only intended for reading window configuration data it does not alter the model, the window or the wall assembly.
  • If no wall group name is supplied the selection set in the model will be analyzed to determine if a wall assembly has been selected.

wall_door_draw

Creates a new door within a wall assembly at the specified distance/location along the wall.

Syntax

wall_door_draw(door_loc, door_width, door_height, door_geom = 'Rectangle', group = nil, door_install = 'YES', door_trim = 'YES', door_casing = 'YES')

Parameters

  • door_loc - Numeric value (inches) along the wall to locate the placement (center) of the door
  • door_width - Door width measured in inches
  • door_height - Door geometry, valid options are: Rectangle, Arch
  • group - Wall group name or SketchUp group object (optional)
  • door_install - Option to install the door unit in the door opening, 'YES' or 'NO' (optional)
  • door_trim - Option to install exterior trim around the door opening, 'YES' or 'NO' (optional)
  • door_casing - Option to install interior casing around the door opening, 'YES' or 'NO' (optional)

Examples:

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_door_draw(48.0, 36.0, 80.0)
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_door_draw(48.0, 60.0, 80.0, 'Rectangle', 'RECT_WALL_ASSEMBLY_2024110823301222', 'YES', 'NO', 'NO')

wall_door_read_attributes

Reads the stored attributes for a door from an existing Medeek Wall assembly. Since the attributes are stored in nested libraries the data is given as a hash of arrays.

Syntax

wall_door_read_attributes(door_group_name, group)

Parameters

  • door_group_name - Window group name, naming convention always follows this pattern: DOOR1, DOOR2, DOOR3 etc...
  • group - Wall group name or SketchUp group object (optional)

Returns

  • A hash of door attributes when the wall and door is valid
  • false or nil if the supplied object is not a valid Medeek Wall assembly and the door does not exist

Example

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_door_read_attributes('DOOR1')
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_door_read_attributes('DOOR1', 'RECT_WALL_ASSEMBLY_2024110823301222')

Notes

  • Use this method when you need to inspect all available door settings/parameters.
  • Please read the door attribute library index to understand what each parameter/attribute does with regards to the door sub-assembly.
  • This method is only intended for reading door configuration data it does not alter the model, the door or the wall assembly.
  • If no wall group name is supplied the selection set in the model will be analyzed to determine if a wall assembly has been selected.

wall_garage_draw

Creates a new garage door within a wall assembly at the specified distance/location along the wall.

Syntax

wall_garage_draw(garage_loc, garage_width, garage_height, garage_geom = 'Rectangle', group = nil, garage_install = 'YES', garage_trim = 'YES', garage_casing = 'YES')

Parameters

  • garage_loc - Numeric value (inches) along the wall to locate the placement (center) of the garage door
  • garage_width - Garage door width measured in inches
  • garage_height - Garage door geometry, valid options are: Rectangle, Arch, Dutch
  • group - Wall group name or SketchUp group object (optional)
  • garage_install - Option to install the garage door unit in the garage opening, 'YES' or 'NO' (optional)
  • garage_trim - Option to install exterior trim around the garage door opening, 'YES' or 'NO' (optional)
  • garage_casing - Option to install interior casing around the garage door opening, 'YES' or 'NO' (optional)

Examples:

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_garage_draw(144.0, 120.0, 84.0)
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_garage_draw(144.0, 120.0, 84.0, 'Rectangle', 'RECT_WALL_ASSEMBLY_2024110823301222', 'YES', 'NO', 'NO')

wall_garage_read_attributes

Reads the stored attributes for a garage door from an existing Medeek Wall assembly. Since the attributes are stored in nested libraries the data is given as a hash of arrays.

Syntax

wall_garage_read_attributes(garage_group_name, group)

Parameters

  • garage_group_name - Garage door group name, naming convention always follows this pattern: GARAGE1, GARAGE2, GARAGE3 etc...
  • group - Wall group name or SketchUp group object (optional)

Returns

  • A hash of garage door attributes when the wall and garage door is valid
  • false or nil if the supplied object is not a valid Medeek Wall assembly and the garage door does not exist

Example

Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_garage_read_attributes('GARAGE1')
Medeek_Engineering_Inc_Extensions::MedeekWallPlugin::Wall::MedeekMethods.wall_garage_read_attributes('GARAGE1', 'RECT_WALL_ASSEMBLY_2024110823301222')

Notes

  • Use this method when you need to inspect all available garage door settings/parameters.
  • Please read the garage door attribute library index to understand what each parameter/attribute does with regards to the garage door sub-assembly.
  • This method is only intended for reading garage door configuration data it does not alter the model, the garage door or the wall assembly.
  • If no wall group name is supplied the selection set in the model will be analyzed to determine if a wall assembly has been selected.