Method: Autocad::Drawing#get_variables

Defined in:
lib/autocad/drawing.rb

#get_variables(*atts) ⇒ Array<Object>

Get the values of multiple system variables

Examples:

Get multiple dimension settings

scale, arrow_size = drawing.get_variables("DIMSCALE", "DIMASZ")

Parameters:

  • *atts (Array<String>)

    The names of the system variables

Returns:

  • (Array<Object>)

    The values of the system variables



705
706
707
708
709
710
711
712
713
714
# File 'lib/autocad/drawing.rb', line 705

def get_variables(*atts)
  return [] if atts.empty?
  if atts.first.class == Array
    atts = atts.first
  end
  atts.each_with_object([]) do |k, a|
    a << ole_obj.GetVariable(k)
    a
  end
end