module Microstation::Functions

Public Instance Methods

clear_ui() click to toggle source
# File lib/microstation/functions.rb, line 44
def clear_ui
  cad_input_queue.clear_ui
end
get_point() click to toggle source
# File lib/microstation/functions.rb, line 48
def get_point
  cad_input_queue.get_point
end
get_points_by_line() click to toggle source
# File lib/microstation/functions.rb, line 28
def get_points_by_line
  queue = cad_input_queue
  queue.show_command("Get points by line")
  start_point = queue.get_point
  if start_point.failure?
    return Failure(:point1_reset)
  end
  queue.send_command "PLACE LINE"
  queue.send_data_point start_point.value!
  end_point = queue.get_point("Enter next vertex")
  if end_point.failure?
    return Failure(:point2_reset)
  end
  Success([start_point.value!, end_point.value!])
end
get_points_by_rectangle() click to toggle source
# File lib/microstation/functions.rb, line 12
def get_points_by_rectangle
  queue = cad_input_queue
  queue.show_command('Get points by block')
  start_point = queue.get_point
  if start_point.failure?
    return Failure(:point1_reset)
  end
  queue.send_command "PLACE BLOCK"
  queue.send_data_point start_point.value!
  end_point = queue.get_point
  if end_point.failure?
    return Failure(:point2_reset)
  end
  Success([start_point.value!, end_point.value!])
end