autocad 0.4.6 → 0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop/minitest.yml +2 -2
  3. data/.rubocop/strict.yml +4 -4
  4. data/.rubocop.yml +36 -33
  5. data/CHANGELOG.md +5 -5
  6. data/LICENSE.txt +21 -21
  7. data/README.md +134 -39
  8. data/Rakefile +26 -10
  9. data/exe/autocad +3 -3
  10. data/gemfiles/rubocop.gemfile +2 -1
  11. data/lib/autocad/app.rb +127 -28
  12. data/lib/autocad/arc.rb +3 -0
  13. data/lib/autocad/block.rb +11 -6
  14. data/lib/autocad/block_reference.rb +33 -4
  15. data/lib/autocad/bounding_box.rb +202 -0
  16. data/lib/autocad/dim_style.rb +4 -0
  17. data/lib/autocad/drawing.rb +873 -172
  18. data/lib/autocad/element.rb +217 -25
  19. data/lib/autocad/errors.rb +9 -0
  20. data/lib/autocad/filter.rb +502 -168
  21. data/lib/autocad/layer.rb +129 -41
  22. data/lib/autocad/layout.rb +120 -0
  23. data/lib/autocad/line.rb +154 -55
  24. data/lib/autocad/message_box.rb +95 -95
  25. data/lib/autocad/model.rb +217 -89
  26. data/lib/autocad/mtext.rb +189 -110
  27. data/lib/autocad/plot.rb +45 -0
  28. data/lib/autocad/plot_configuration.rb +372 -0
  29. data/lib/autocad/point.rb +7 -0
  30. data/lib/autocad/point3d.rb +18 -11
  31. data/lib/autocad/pviewport.rb +136 -21
  32. data/lib/autocad/selection_filter.rb +358 -180
  33. data/lib/autocad/selection_set.rb +140 -61
  34. data/lib/autocad/selection_set_adapter.rb +187 -8
  35. data/lib/autocad/spline.rb +27 -0
  36. data/lib/autocad/text.rb +66 -11
  37. data/lib/autocad/text_style.rb +4 -0
  38. data/lib/autocad/version.rb +1 -1
  39. data/lib/autocad/viewport.rb +57 -0
  40. data/lib/autocad.rb +126 -30
  41. data/lib/faa/cleanup.rb +137 -0
  42. data/lib/win32ole_helper.rb +52 -0
  43. data/rbs_collection.lock.yaml +38 -18
  44. data/sig/generated/autocad/app.rbs +278 -251
  45. data/sig/generated/autocad/arc.rbs +6 -3
  46. data/sig/generated/autocad/block.rbs +8 -5
  47. data/sig/generated/autocad/block_reference.rbs +99 -59
  48. data/sig/generated/autocad/bounding_box.rbs +78 -0
  49. data/sig/generated/autocad/dim_style.rbs +6 -0
  50. data/sig/generated/autocad/drawing.rbs +597 -158
  51. data/sig/generated/autocad/element.rbs +233 -166
  52. data/sig/generated/autocad/errors.rbs +29 -23
  53. data/sig/generated/autocad/filter.rbs +388 -60
  54. data/sig/generated/autocad/layer.rbs +76 -19
  55. data/sig/generated/autocad/layout.rbs +64 -0
  56. data/sig/generated/autocad/line.rbs +128 -25
  57. data/sig/generated/autocad/message_box.rbs +81 -81
  58. data/sig/generated/autocad/model.rbs +115 -41
  59. data/sig/generated/autocad/mtext.rbs +123 -0
  60. data/sig/generated/autocad/plot.rbs +26 -0
  61. data/sig/generated/autocad/plot_configuration.rbs +176 -0
  62. data/sig/generated/autocad/point.rbs +7 -0
  63. data/sig/generated/autocad/point3d.rbs +70 -66
  64. data/sig/generated/autocad/pviewport.rbs +64 -0
  65. data/sig/generated/autocad/selection_filter.rbs +226 -50
  66. data/sig/generated/autocad/selection_set.rbs +112 -37
  67. data/sig/generated/autocad/selection_set_adapter.rbs +235 -28
  68. data/sig/generated/autocad/spline.rbs +22 -0
  69. data/sig/generated/autocad/text.rbs +66 -7
  70. data/sig/generated/autocad/text_style.rbs +6 -0
  71. data/sig/generated/autocad/viewport.rbs +19 -2
  72. data/sig/generated/autocad.rbs +140 -68
  73. data/sig/generated/faa/cleanup.rbs +53 -0
  74. data/sig/generated/win32ole_helper.rbs +9 -0
  75. data/sig/prototype/lib/autocad/app.rbs +3 -1
  76. data/sig/prototype/lib/autocad/bounding_box.rbs +15 -0
  77. data/sig/prototype/lib/autocad/drawing.rbs +6 -0
  78. data/sig/prototype/lib/autocad/layer.rbs +5 -0
  79. data/sig/prototype/lib/autocad/viewport.rbs +7 -0
  80. data/sig/prototype/lib/autocad.rbs +1 -1
  81. metadata +29 -5
  82. data/event_handler.log +0 -24
  83. data/sig/generated/autocad/text_node.rbs +0 -37
@@ -1,251 +1,278 @@
1
- # Generated from lib/autocad/app.rb with RBS::Inline
2
-
3
- module Windows
4
- class FileSystem
5
- def self.windows_path: (untyped path) -> untyped
6
-
7
- # Convert path to windows path
8
- # @rbs path: String, Pathname the path you want to convert
9
- def windows_path: (String path) -> untyped
10
-
11
- def fs_object: () -> untyped
12
- end
13
- end
14
-
15
- module Autocad
16
- class App
17
- include Common
18
-
19
- attr_accessor default_error_proc: untyped
20
-
21
- def self.default_app_options: () -> untyped
22
-
23
- def self.debug_error: () -> untyped
24
-
25
- # save the current drawing
26
- # @rbs dir: String|Pathname -- the dir to save drawing to
27
- # @rbs exit: bool -- whether to exit afterwards or start irb
28
- # @rbs model: bool -- prints model space instead of paperspace in pdf document
29
- # @rbs return void
30
- def self.save_open_drawings: (?dir: String | Pathname, ?exit: bool, ?model: bool) -> void
31
-
32
- # Runs the app, opening the filenames
33
- # and yielding each open drawing to the
34
- # supplied block
35
- # it automatically closes the drawing and
36
- # the app when done
37
- #
38
- # [source]
39
- # dir = Pathname.new('C:/templates')
40
- # drawings = Pathname.glob(dir + '/**/*.dgn')
41
- # App.with_drawings(drawings) do |drawing|
42
- # drawing.save_as_pdf(dir: 'c:/output/')
43
- # end
44
- #
45
- # @rbs *files: Array[String|Pathname]
46
- # @rbs visible: bool -- show the app window
47
- # @rbs error_proc: (Exception, Drawing) -> void
48
- # @rbs wait_time: Integer -- the total amount of time to wait to open file (500)
49
- # @rbs wait_interval: Float -- the amount of time to wait between attempts (0.5)
50
- # @rbs read_only: bool
51
- # @rbs &: (Drawing) -> void
52
- def self.with_drawings: (*Array[String | Pathname] files, ?visible: bool, ?error_proc: untyped, ?wait_time: Integer, ?wait_interval: Float, ?read_only: bool) { (Drawing) -> void } -> untyped
53
-
54
- # gets all dwg and dgn files in the directory given by
55
- # dir_or_file or gets the file given by dir_or_file
56
- # and saves them as pdf files in the outdir
57
- # @rbs dir_or_file: String the directory of drawing [dgn,dwg] to convert
58
- # @rbs outdir: String the output dir for converted pdf files
59
- # @rbs return void
60
- def self.dwg2pdf: (String dir_or_file, ?outdir: String, ?mode: untyped) -> void
61
-
62
- # Initialize an instance of app with the options
63
- # @rbs : Hash] options the options to create the app with
64
- # @option options bool :visible Is the app visible
65
- #
66
- # [source]
67
- # ----
68
- # App.run do |app|
69
- # drawing = app.open_drawing('test.dgn')
70
- # drawing.scan_all_text do |model,text|
71
- # puts "#{model} #{text}"
72
- # end
73
- # end
74
- # @rbs options: Hash[Symbol,Object]
75
- # @rbs &: (App) -> void -- the_app yields the instanciated app
76
- def self.run: (?Hash[Symbol, Object] options) { (App) -> void } -> void
77
-
78
- # Calls #run to get an app instance then call open drawing with
79
- # that app
80
- # (see #open_drawing)
81
- # @rbs &block: { (Drawing) -> void }
82
- def self.open_drawing: (untyped drawing, **untyped options) ?{ (?) -> untyped } -> void
83
-
84
- # @rbs return bool -- true if there is an active drawing
85
- def active_drawing?: () -> bool
86
-
87
- # @rbs return Drawing | nil -- returns drawing if active_drawing
88
- def active_drawing: () -> (Drawing | nil)
89
-
90
- def drawing_from_ole: (untyped ole) -> Drawing
91
-
92
- attr_reader error_proc: untyped
93
-
94
- attr_reader visible: untyped
95
-
96
- attr_reader logger: untyped
97
-
98
- # Constructor for app
99
- # @rbs visible: bool -- do you want the app to be visible
100
- # @rbs event_handler: EventHandler
101
- def initialize: (?visible: bool, ?error_proc: untyped, ?event_handler: EventHandler, ?wait_interval: untyped, ?wait_time: untyped) -> untyped
102
-
103
- def windows_path: (untyped path) -> untyped
104
-
105
- def wrap: (untyped item, ?untyped cell) -> untyped
106
-
107
- # the default EventHandler
108
- #
109
- # @rbs return EventHandler -- returns the default EventHandler
110
- def default_event_handler: () -> EventHandler
111
-
112
- def default_app_options: () -> untyped
113
-
114
- # register an handler
115
- #
116
- # @rbs event: String -- event to registor for
117
- def register_handler: (String event) ?{ (?) -> untyped } -> untyped
118
-
119
- #
120
- # return a Handler
121
- #
122
- # @rbs : String,Symbol] event the event key
123
- #
124
- # @rbs return Proc returns the Proc given by event name
125
- def get_handler: (untyped event) -> Proc
126
-
127
- def load_constants: (untyped ole) -> untyped
128
-
129
- def run_loop: () -> untyped
130
-
131
- def stop_loop: () -> untyped
132
-
133
- def exit_message_loop: () -> untyped
134
-
135
- def visible?: () -> untyped
136
-
137
- def visible=: (untyped value) -> untyped
138
-
139
- def make_visible: (untyped visible) -> untyped
140
-
141
- # Zooms the current viewport to display the entire drawing
142
- def zoom_all: () -> untyped
143
-
144
- # Zooms the current viewport to a specific center point and magnify factor
145
- # @rbs center: Point3d | [Float, Float, Float| nil] -- center of zoom
146
- # @rbs magnify: Float
147
- def zoom_center: (Point3d | [ Float, Float, Float | nil ] center, ?magnify: Float) -> untyped
148
-
149
- def ole_obj: () -> untyped
150
-
151
- def quit: () -> untyped
152
-
153
- def close_all_drawings: () -> untyped
154
-
155
- def close_active_drawing: () -> untyped
156
-
157
- # create a new drawing
158
- #
159
- # @rbs filename: String | Pathname -- The name of the drawing.
160
- # @rbs seedfile: String -- The name of the seed file.
161
- # should not include a path. The default ggextension is ".dgn".
162
- # Typical values are "seed2d" or "seed3d".
163
- # @rbs open: bool -- If the open argument is True,
164
- # CreateDesignFile returns the newly-opened DesignFile object;
165
- # this is the same value as ActiveDesignFile. If the Open argument is False,
166
- # CreateDesignFile returns Nothing.
167
- # @rbs return Drawing, void -- returns the new drawing
168
- def new_drawing: (String | Pathname filename, ?open: bool, ?options: untyped) ?{ (?) -> untyped } -> Drawing
169
-
170
- # open the drawing
171
- # @rbs filename: String the name of the file to open
172
- # @rbs : bool :read_only (false)
173
- # @rbs wait_time: Integer -- the total amount of time to wait to open file (500)
174
- # @rbs wait_interval: Float -- the amount of time in seconds to wait before retry (0.5)
175
- # @rbs error_proc: Proc -- a proc to run
176
- # @rbs &: (Drawing) -> (void)
177
- # @rbs return Drawing | void
178
- def open_drawing: (String filename, ?read_only: untyped, ?wait_time: Integer, ?wait_interval: Float, ?error_proc: Proc) { (Drawing) -> void } -> (Drawing | void)
179
-
180
- def model_space: () -> untyped
181
-
182
- # @rbs message: String -- the String to put in Autocad prompt
183
- def prompt: (String message) -> untyped
184
-
185
- # @rbs prompt: string -- the string to prompt the user for string
186
- # @rbs has_spaces: bool -- whether the string returned can contain spaces
187
- def get_input_string: () -> untyped
188
-
189
- # @rbs prompt: string -- the string to prompt the user for integer
190
- def get_input_integer: () -> untyped
191
-
192
- # In a running Autocad instance, prompts the user for a point.
193
- # Uses the prompt argument as the prompt string.
194
- # If base_point is provided, it is used as the base point and a
195
- # stretched line is drawn from the base point to the returned point.
196
- # @rbs prompt: String
197
- # @rbs base_point: Array, Point3d, nil
198
- # @rbs return [Point3d]
199
- def get_point: () -> [ Point3d ]
200
-
201
- # In autocad prompts the user for a selection.
202
- # @rbs prompt: String the prompt that displays in Autocad
203
- # @rbs name: String the name of the selection
204
- # @rbs return [SelectionSet]
205
- def get_selection: (?prompt: String, ?name: String) -> [ SelectionSet ]
206
-
207
- def has_documents?: () -> untyped
208
-
209
- # @rbs return Enumerator[Drawing] | void
210
- # @rbs &: (Drawing) -> void
211
- def documents: () { (Drawing) -> void } -> (Enumerator[Drawing] | void)
212
-
213
- # @rbs return [bool] true
214
- def drawing_opened?: () -> [ bool ]
215
-
216
- # @rbs return [Pathname] Autocad Files.TemplateDwgPath
217
- def templates_path: () -> [ Pathname ]
218
-
219
- def templates: () -> untyped
220
-
221
- # Set Autocad Files.TemplateDwgPath
222
- # @rbs path: Pathname, String the location on disk for Autocad templates
223
- def template_path=: (Pathname path) -> untyped
224
-
225
- # @rbs return [Array<Pathname>] all paths in Files.SupportPath
226
- def support_paths: () -> untyped
227
-
228
- # @rbs return [Array<Pathname>] all paths in Files.PrinterConfigPath
229
- def printer_config_paths: () -> untyped
230
-
231
- # from the printer_config_paths, return all plotcfg files
232
- # @rbs return [Enumerator[String]]
233
- def plot_configs: () -> [ Enumerator[String] ]
234
-
235
- private
236
-
237
- def ole_preferences_files: () -> untyped
238
-
239
- def send_command: (untyped command) -> untyped
240
-
241
- def init_ole_and_app_event: (?visible: untyped, ?event_handler: untyped, ?tries: untyped, ?sleep_duration: untyped) -> untyped
242
-
243
- def doc_ole: () -> untyped
244
-
245
- def new_ole_drawing: (untyped filename, ?open: untyped, ?wait_time: untyped, ?wait_interval: untyped) -> untyped
246
-
247
- def ole_open_drawing: (untyped filename, ?read_only: untyped, ?wait_time: untyped, ?wait_interval: untyped) -> untyped
248
-
249
- def wait_drawing_opened: (untyped secs, ?untyped interval) -> untyped
250
- end
251
- end
1
+ # Generated from lib/autocad/app.rb with RBS::Inline
2
+
3
+ module Windows
4
+ class FileSystem
5
+ def self.windows_path: (untyped path) -> untyped
6
+
7
+ # Convert path to windows path
8
+ # @rbs path: String, Pathname the path you want to convert
9
+ def windows_path: (String path) -> untyped
10
+
11
+ def fs_object: () -> untyped
12
+ end
13
+ end
14
+
15
+ module Autocad
16
+ class App
17
+ include Common
18
+
19
+ attr_accessor default_error_proc: untyped
20
+
21
+ def self.default_app_options: () -> untyped
22
+
23
+ def self.debug_error: () -> untyped
24
+
25
+ # save the current drawing
26
+ # @rbs dir: String|Pathname -- the dir to save drawing to
27
+ # @rbs exit: bool -- whether to exit afterwards or start irb
28
+ # @rbs model: bool -- prints model space instead of paperspace in pdf document
29
+ # @rbs return void
30
+ def self.save_open_drawings: (?dir: String | Pathname, ?exit: bool, ?model: bool) -> void
31
+
32
+ # Runs the app, opening the filenames
33
+ # and yielding each open drawing to the
34
+ # supplied block
35
+ # it automatically closes the drawing and
36
+ # the app when done
37
+ #
38
+ # [source]
39
+ # dir = Pathname.new('C:/templates')
40
+ # drawings = Pathname.glob(dir + '/**/*.dgn')
41
+ # App.with_drawings(drawings) do |drawing|
42
+ # drawing.save_as_pdf(dir: 'c:/output/')
43
+ # end
44
+ #
45
+ # @rbs *files: Array[String|Pathname]
46
+ # @rbs visible: bool -- show the app window
47
+ # @rbs error_proc: (Exception, Drawing) -> void
48
+ # @rbs wait_time: Integer -- the total amount of time to wait to open file (500)
49
+ # @rbs wait_interval: Float -- the amount of time to wait between attempts (0.5)
50
+ # @rbs read_only: bool
51
+ # @rbs &: (Drawing) -> void
52
+ def self.with_drawings: (*Array[String | Pathname] files, ?visible: bool, ?error_proc: untyped, ?wait_time: Integer, ?wait_interval: Float, ?read_only: bool) { (Drawing) -> void } -> untyped
53
+
54
+ # gets all dwg and dgn files in the directory given by
55
+ # dir_or_file or gets the file given by dir_or_file
56
+ # and saves them as pdf files in the outdir
57
+ # @rbs dir_or_file: String the directory of drawing [dgn,dwg] to convert
58
+ # @rbs outdir: String the output dir for converted pdf files
59
+ # @rbs return void
60
+ def self.dwg2pdf: (String dir_or_file, ?outdir: String, ?mode: untyped) -> void
61
+
62
+ # Initialize an instance of app with the options
63
+ # @rbs : Hash] options the options to create the app with
64
+ # @option options bool :visible Is the app visible
65
+ #
66
+ # [source]
67
+ # ----
68
+ # App.run do |app|
69
+ # drawing = app.open_drawing('test.dgn')
70
+ # drawing.scan_all_text do |model,text|
71
+ # puts "#{model} #{text}"
72
+ # end
73
+ # end
74
+ # @rbs options: Hash[Symbol,Object]
75
+ # @rbs &: (App) -> void -- the_app yields the instanciated app
76
+ def self.run: (?Hash[Symbol, Object] options) { (App) -> void } -> void
77
+
78
+ # Calls #run to get an app instance then call open drawing with
79
+ # that app
80
+ # (see #open_drawing)
81
+ # @rbs &block: { (Drawing) -> void }
82
+ def self.open_drawing: (untyped drawing, **untyped options) ?{ (?) -> untyped } -> void
83
+
84
+ # @rbs return bool -- true if there is an active drawing
85
+ def active_drawing?: () -> bool
86
+
87
+ # @rbs return Drawing | nil -- returns drawing if active_drawing
88
+ def active_drawing: () -> (Drawing | nil)
89
+
90
+ # @rbs drawing: Drawing
91
+ # @rbs return void
92
+ def active_drawing=: (Drawing drawing) -> void
93
+
94
+ def drawing_from_ole: (untyped ole, ?untyped requested_name) -> Drawing
95
+
96
+ attr_reader visible: untyped
97
+
98
+ attr_reader logger: untyped
99
+
100
+ attr_accessor error_proc: untyped
101
+
102
+ # Constructor for app
103
+ # @rbs visible: bool -- do you want the app to be visible
104
+ # @rbs event_handler: EventHandler
105
+ def initialize: (?visible: bool, ?error_proc: untyped, ?event_handler: EventHandler, ?wait_interval: untyped, ?wait_time: untyped) -> untyped
106
+
107
+ # save the current drawing
108
+ # @rbs dir: String|Pathname -- the dir to save drawing to
109
+ # @rbs model: bool -- prints model space instead of paperspace in pdf document
110
+ # @rbs return void
111
+ def save_open_drawings: (?dir: String | Pathname, ?model: bool) -> void
112
+
113
+ def windows_path: (untyped path) -> untyped
114
+
115
+ def wrap: (untyped item, ?untyped cell) -> untyped
116
+
117
+ # the default EventHandler
118
+ #
119
+ # @rbs return EventHandler -- returns the default EventHandler
120
+ def default_event_handler: () -> EventHandler
121
+
122
+ def default_app_options: () -> untyped
123
+
124
+ # register an handler
125
+ #
126
+ # @rbs event: String -- event to registor for
127
+ def register_handler: (String event) ?{ (?) -> untyped } -> untyped
128
+
129
+ #
130
+ # return a Handler
131
+ #
132
+ # @rbs : String,Symbol] event the event key
133
+ #
134
+ # @rbs return Proc returns the Proc given by event name
135
+ def get_handler: (untyped event) -> Proc
136
+
137
+ def load_constants: (untyped ole) -> untyped
138
+
139
+ def run_loop: () -> untyped
140
+
141
+ def stop_loop: () -> untyped
142
+
143
+ def exit_message_loop: () -> untyped
144
+
145
+ def visible?: () -> untyped
146
+
147
+ def visible=: (untyped value) -> untyped
148
+
149
+ def make_visible: (untyped visible) -> untyped
150
+
151
+ # Zooms the current viewport to display the entire drawing
152
+ def zoom_all: () -> untyped
153
+
154
+ def zoom_center: (untyped center, ?magnify: untyped) -> untyped
155
+
156
+ def zoom_window: (untyped pt1, untyped pt2) -> untyped
157
+
158
+ def zoom_pick_window: () -> untyped
159
+
160
+ def zoom_extents: () -> untyped
161
+
162
+ def zoom_previous: () -> untyped
163
+
164
+ def zoom_scaled: (?untyped magnify, ?scale_type: untyped) -> untyped
165
+
166
+ # Zooms the current viewport to a specific center point and magnify factor
167
+ # @rbs center: Point3d | [Float, Float, Float| nil] -- center of zoom
168
+ # @rbs magnify: Float
169
+ def zoom_center: (Point3d | [ Float, Float, Float | nil ] center, ?magnify: Float) -> untyped
170
+
171
+ def ole_obj: () -> untyped
172
+
173
+ def quit: () -> untyped
174
+
175
+ def close_all_drawings: (?save: untyped) -> untyped
176
+
177
+ # Close a specific drawing
178
+ # @rbs drawing: Drawing | String -- the drawing or drawing name to close
179
+ # @rbs save: bool -- whether to save the drawing
180
+ def close_drawing: (Drawing | String drawing, ?bool save) -> untyped
181
+
182
+ def close_active_drawing: () -> untyped
183
+
184
+ # create a new drawing
185
+ #
186
+ # @rbs filename: String | Pathname -- The name of the drawing.
187
+ # @rbs seedfile: String -- The name of the seed file.
188
+ # should not include a path. The default ggextension is ".dgn".
189
+ # Typical values are "seed2d" or "seed3d".
190
+ # @rbs open: bool -- If the open argument is True,
191
+ # CreateDesignFile returns the newly-opened DesignFile object;
192
+ # this is the same value as ActiveDesignFile. If the Open argument is False,
193
+ # CreateDesignFile returns Nothing.
194
+ # @rbs return Drawing, void -- returns the new drawing
195
+ def new_drawing: (String | Pathname filename, ?open: bool, ?options: untyped) ?{ (?) -> untyped } -> Drawing
196
+
197
+ # open the drawing
198
+ # @rbs filename: String the name of the file to open
199
+ # @rbs : bool :read_only (false)
200
+ # @rbs wait_time: Integer -- the total amount of time to wait to open file (500)
201
+ # @rbs wait_interval: Float -- the amount of time in seconds to wait before retry (0.5)
202
+ # @rbs error_proc: Proc -- a proc to run
203
+ # @rbs &: (Drawing) -> (void)
204
+ # @rbs return Drawing | void
205
+ def open_drawing: (String filename, ?read_only: untyped, ?wait_time: Integer, ?wait_interval: Float, ?error_proc: Proc) { (Drawing) -> void } -> (Drawing | void)
206
+
207
+ # @rbs message: String -- the String to put in Autocad prompt
208
+ def prompt: (String message) -> untyped
209
+
210
+ # @rbs prompt: string -- the string to prompt the user for string
211
+ # @rbs has_spaces: bool -- whether the string returned can contain spaces
212
+ def get_input_string: () -> untyped
213
+
214
+ # @rbs prompt: string -- the string to prompt the user for integer
215
+ def get_input_integer: () -> untyped
216
+
217
+ # In a running Autocad instance, prompts the user for a point.
218
+ # Uses the prompt argument as the prompt string.
219
+ # If base_point is provided, it is used as the base point and a
220
+ # stretched line is drawn from the base point to the returned point.
221
+ # @rbs prompt: String
222
+ # @rbs base_point: Array, Point3d, nil
223
+ # @rbs return [Point3d]
224
+ def get_point: () -> [ Point3d ]
225
+
226
+ # In autocad prompts the user for a selection.
227
+ # @rbs prompt: String the prompt that displays in Autocad
228
+ # @rbs name: String the name of the selection
229
+ # @rbs return [SelectionSet]
230
+ def get_selection: (?prompt: String, ?name: String) -> [ SelectionSet ]
231
+
232
+ def has_documents?: () -> untyped
233
+
234
+ # @rbs return Enumerator[Drawing] | void
235
+ # @rbs &: (Drawing) -> void
236
+ def documents: () { (Drawing) -> void } -> (Enumerator[Drawing] | void)
237
+
238
+ # @rbs return [bool] true
239
+ def drawing_opened?: () -> [ bool ]
240
+
241
+ # @rbs return [Pathname] Autocad Files.TemplateDwgPath
242
+ def templates_path: () -> [ Pathname ]
243
+
244
+ def templates: () -> untyped
245
+
246
+ # Set Autocad Files.TemplateDwgPath
247
+ # @rbs path: Pathname, String the location on disk for Autocad templates
248
+ def template_path=: (Pathname path) -> untyped
249
+
250
+ # @rbs return [Array<Pathname>] all paths in Files.SupportPath
251
+ def support_paths: () -> untyped
252
+
253
+ def support_path_files: () -> untyped
254
+
255
+ # @rbs return [Array<Pathname>] all paths in Files.PrinterConfigPath
256
+ def printer_config_paths: () -> untyped
257
+
258
+ # from the printer_config_paths, return all plotcfg files
259
+ # @rbs return [Enumerator[String]]
260
+ def plot_configs: () -> [ Enumerator[String] ]
261
+
262
+ private
263
+
264
+ def ole_preferences_files: () -> untyped
265
+
266
+ def send_command: (untyped command) -> untyped
267
+
268
+ def init_ole_and_app_event: (?visible: untyped, ?event_handler: untyped, ?tries: untyped, ?sleep_duration: untyped) -> untyped
269
+
270
+ def doc_ole: () -> untyped
271
+
272
+ def new_ole_drawing: (untyped filename, ?open: untyped, ?wait_time: untyped, ?wait_interval: untyped) -> untyped
273
+
274
+ def ole_open_drawing: (untyped filename, ?read_only: untyped, ?wait_time: untyped, ?wait_interval: untyped) -> untyped
275
+
276
+ def wait_drawing_opened: (untyped secs, ?untyped interval) -> untyped
277
+ end
278
+ end
@@ -2,11 +2,14 @@
2
2
 
3
3
  module Autocad
4
4
  class Arc < Element
5
- def length: () -> untyped
5
+ # @rbs return Float
6
+ def length: () -> Float
6
7
 
7
- def start_point: () -> untyped
8
+ # @rbs return Point3d
9
+ def start_point: () -> Point3d
8
10
 
9
- def end_point: () -> untyped
11
+ # @rbs return Point3d
12
+ def end_point: () -> Point3d
10
13
 
11
14
  def start_angle: () -> untyped
12
15
 
@@ -4,15 +4,18 @@ module Autocad
4
4
  class Block < Element
5
5
  def each: () -> untyped
6
6
 
7
- def attributes?: () -> untyped
7
+ # @rbs return bool
8
+ def block?: () -> bool
8
9
 
9
- def name: () -> untyped
10
+ def attributes?: () -> bool
10
11
 
11
- def layout?: () -> untyped
12
+ def name: () -> String
12
13
 
13
- def xref?: () -> untyped
14
+ def layout?: () -> bool
14
15
 
15
- def dynamic?: () -> untyped
16
+ def xref?: () -> bool
17
+
18
+ def dynamic?: () -> bool
16
19
 
17
20
  def attribute_hash: () -> untyped
18
21