Send To LayOut via Ruby

A cross-platform method to send the active model to LayOut:

def send_active_model_to_layout()
  return nil unless Sketchup.is_pro?
  if (Sketchup.respond_to?(:platform) &&
  Sketchup::platform == :platform_win ) ||
  RUBY_PLATFORM !~ /(darwin)/i
    Sketchup::send_action( 23051 )
  else
    Sketchup::send_action("sendToLayOut:")
  end
end
1 Like