Class: Microstation::OLE_CadInputMessage

Inherits:
Object
  • Object
show all
Includes:
WIN32OLE::VARIANT
Defined in:
lib/microstation/ole_cad_input_message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ole, app) ⇒ OLE_CadInputMessage

Returns a new instance of OLE_CadInputMessage.



22
23
24
25
# File 'lib/microstation/ole_cad_input_message.rb', line 22

def initialize(ole,app)
  @ole_obj = ole
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



19
20
21
# File 'lib/microstation/ole_cad_input_message.rb', line 19

def app
  @app
end

#lastargsObject (readonly)

Returns the value of attribute lastargs.



19
20
21
# File 'lib/microstation/ole_cad_input_message.rb', line 19

def lastargs
  @lastargs
end

#ole_objObject (readonly)

Returns the value of attribute ole_obj.



19
20
21
# File 'lib/microstation/ole_cad_input_message.rb', line 19

def ole_obj
  @ole_obj
end

Instance Method Details

#any?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/microstation/ole_cad_input_message.rb', line 43

def any?
  input_type == InputType::Any
end

#command?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/microstation/ole_cad_input_message.rb', line 31

def command?
  input_type == InputType::Command
end

#data_point?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/microstation/ole_cad_input_message.rb', line 35

def data_point?
  input_type == InputType::DataPoint
end

#get_command_keyinObject

BSTR CommandKeyin



73
74
75
76
77
# File 'lib/microstation/ole_cad_input_message.rb', line 73

def get_command_keyin()
  ret = ole_obj._getproperty(1610743811, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#get_cursor_buttonObject

I4 CursorButton



94
95
96
97
98
# File 'lib/microstation/ole_cad_input_message.rb', line 94

def get_cursor_button()
  ret = ole_obj._getproperty(1610743814, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#get_input_typeObject

MsdCadInputType InputType



56
57
58
# File 'lib/microstation/ole_cad_input_message.rb', line 56

def get_input_type()
  ole_obj.InputType
end

#get_keyinObject

BSTR Keyin



61
62
63
64
65
# File 'lib/microstation/ole_cad_input_message.rb', line 61

def get_keyin()
  ret = ole_obj._getproperty(1610743809, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#get_pointObject

Point3d Point



68
69
70
# File 'lib/microstation/ole_cad_input_message.rb', line 68

def get_point()
  app.to_point3d(ole_obj.Point)
end

#get_screen_pointObject

Point3d ScreenPoint



87
88
89
90
91
# File 'lib/microstation/ole_cad_input_message.rb', line 87

def get_screen_point()
  ret = ole_obj._getproperty(1610743813, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#get_viewObject

_View View



80
81
82
83
84
# File 'lib/microstation/ole_cad_input_message.rb', line 80

def get_view()
  ret = ole_obj._getproperty(1610743812, [], [])
  @lastargs = WIN32OLE::ARGV
  ret
end

#input_typeObject



51
52
53
# File 'lib/microstation/ole_cad_input_message.rb', line 51

def input_type
  @input_type ||= get_input_type
end

#key_in?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/microstation/ole_cad_input_message.rb', line 39

def key_in?
  input_type == InputType::Keyin
end

#reset?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/microstation/ole_cad_input_message.rb', line 27

def reset?
  input_type == InputType::Reset
end

#unassigned?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/microstation/ole_cad_input_message.rb', line 47

def unassigned?
  input_type == InputType::Unassigned
end