class LineCreation
Attributes
points[R]
Public Class Methods
new(app)
click to toggle source
# File lib/microstation/primitive_command_interface.rb, line 30 def initialize(app) @app = app @points = Array.new(2) end
Public Instance Methods
DataPoint(pt, view)
click to toggle source
# File lib/microstation/primitive_command_interface.rb, line 35 def DataPoint(pt, view) case points.compact.size when 0 app.ole_obj.CommandState.StartDynamics @points[0] = pt app.show_prompt "Place end point" when 1 @points[1] = pt line_from_pts(@points) @points[0] = @points[1] end end
Dynamics(pt, view, drawmode)
click to toggle source
# File lib/microstation/primitive_command_interface.rb, line 49 def Dynamics(pt, view, drawmode) if @points.compact.size == 1 @points[1] = pt line = line_from_pts(@points) end end
Reset()
click to toggle source
# File lib/microstation/primitive_command_interface.rb, line 56 def Reset app.CommandState.StartPrimitive self @points = Array.new(2) end
Start()
click to toggle source
# File lib/microstation/primitive_command_interface.rb, line 61 def Start app.show_command "VBA PlaceLine Example" app.show_prompt "Select start of line" end