autocad 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop/minitest.yml +2 -0
- data/.rubocop/strict.yml +4 -0
- data/.rubocop.yml +33 -0
- data/.solargraph.yml +22 -0
- data/.vscode/launch.json +30 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/Guardfile +66 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +10 -0
- data/Steepfile +35 -0
- data/WASD-D-TDS-C001.dwg +0 -0
- data/WASD-D-TDS-C001.pdf +0 -0
- data/autocad.log +1 -0
- data/autocad_example.rb +26 -0
- data/event_handler.log +24 -0
- data/examples/example_save_pdf.rb +5 -0
- data/exe/autocad +3 -0
- data/exe/dgn2pdf +50 -0
- data/exe/pw_print +43 -0
- data/gemfiles/rubocop.gemfile +6 -0
- data/lib/autocad/app.rb +655 -0
- data/lib/autocad/arc.rb +29 -0
- data/lib/autocad/block.rb +141 -0
- data/lib/autocad/block_reference.rb +198 -0
- data/lib/autocad/drawing.rb +426 -0
- data/lib/autocad/element.rb +454 -0
- data/lib/autocad/enumerator.rb +24 -0
- data/lib/autocad/errors.rb +37 -0
- data/lib/autocad/event_handler.rb +30 -0
- data/lib/autocad/filter.rb +168 -0
- data/lib/autocad/layer.rb +41 -0
- data/lib/autocad/line.rb +55 -0
- data/lib/autocad/message_box.rb +95 -0
- data/lib/autocad/model.rb +89 -0
- data/lib/autocad/mtext.rb +110 -0
- data/lib/autocad/paths.rb +29 -0
- data/lib/autocad/point3d.rb +143 -0
- data/lib/autocad/pviewport.rb +21 -0
- data/lib/autocad/selection_filter.rb +180 -0
- data/lib/autocad/selection_set.rb +61 -0
- data/lib/autocad/selection_set_adapter.rb +146 -0
- data/lib/autocad/text.rb +74 -0
- data/lib/autocad/version.rb +5 -0
- data/lib/autocad.rb +161 -0
- data/olegen.rb +341 -0
- data/rbs_collection.lock.yaml +188 -0
- data/rbs_collection.yaml +19 -0
- data/scanner.obj +0 -0
- data/sig/generated/autocad/app.rbs +251 -0
- data/sig/generated/autocad/arc.rbs +17 -0
- data/sig/generated/autocad/block.rbs +63 -0
- data/sig/generated/autocad/block_reference.rbs +59 -0
- data/sig/generated/autocad/drawing.rbs +158 -0
- data/sig/generated/autocad/element.rbs +166 -0
- data/sig/generated/autocad/enumerator.rbs +15 -0
- data/sig/generated/autocad/errors.rbs +23 -0
- data/sig/generated/autocad/event_handler.rbs +14 -0
- data/sig/generated/autocad/filter.rbs +60 -0
- data/sig/generated/autocad/layer.rbs +19 -0
- data/sig/generated/autocad/line.rbs +25 -0
- data/sig/generated/autocad/message_box.rbs +81 -0
- data/sig/generated/autocad/model.rbs +41 -0
- data/sig/generated/autocad/paths.rbs +19 -0
- data/sig/generated/autocad/point3d.rbs +66 -0
- data/sig/generated/autocad/selection_filter.rbs +50 -0
- data/sig/generated/autocad/selection_set.rbs +37 -0
- data/sig/generated/autocad/selection_set_adapter.rbs +28 -0
- data/sig/generated/autocad/text.rbs +19 -0
- data/sig/generated/autocad/text_node.rbs +37 -0
- data/sig/generated/autocad/version.rbs +5 -0
- data/sig/generated/autocad/viewport.rbs +11 -0
- data/sig/generated/autocad.rbs +68 -0
- data/sig/prototype/lib/autocad/app.rbs +34 -0
- data/sig/prototype/lib/autocad/block.rbs +5 -0
- data/sig/prototype/lib/autocad/block_reference.rbs +5 -0
- data/sig/prototype/lib/autocad/drawing.rbs +13 -0
- data/sig/prototype/lib/autocad/element.rbs +9 -0
- data/sig/prototype/lib/autocad/enumerator.rbs +5 -0
- data/sig/prototype/lib/autocad/event_handler.rbs +7 -0
- data/sig/prototype/lib/autocad/model.rbs +5 -0
- data/sig/prototype/lib/autocad/paths.rbs +5 -0
- data/sig/prototype/lib/autocad.rbs +3 -0
- data/temp/autocad.dwg +0 -0
- data/temp/autocad.log +1 -0
- data/temp/event_handler.log +0 -0
- metadata +147 -0
@@ -0,0 +1,251 @@
|
|
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
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Generated from lib/autocad/arc.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class Arc < Element
|
5
|
+
def length: () -> untyped
|
6
|
+
|
7
|
+
def start_point: () -> untyped
|
8
|
+
|
9
|
+
def end_point: () -> untyped
|
10
|
+
|
11
|
+
def start_angle: () -> untyped
|
12
|
+
|
13
|
+
def end_angle: () -> untyped
|
14
|
+
|
15
|
+
def total_angle: () -> untyped
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# Generated from lib/autocad/block.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class Block < Element
|
5
|
+
def each: () -> untyped
|
6
|
+
|
7
|
+
def attributes?: () -> untyped
|
8
|
+
|
9
|
+
def name: () -> untyped
|
10
|
+
|
11
|
+
def layout?: () -> untyped
|
12
|
+
|
13
|
+
def xref?: () -> untyped
|
14
|
+
|
15
|
+
def dynamic?: () -> untyped
|
16
|
+
|
17
|
+
def attribute_hash: () -> untyped
|
18
|
+
|
19
|
+
def block_type: () -> untyped
|
20
|
+
|
21
|
+
def inspect: () -> untyped
|
22
|
+
|
23
|
+
def attributes: () -> untyped
|
24
|
+
end
|
25
|
+
|
26
|
+
class Attributes
|
27
|
+
include Enumerable
|
28
|
+
|
29
|
+
attr_reader elements: untyped
|
30
|
+
|
31
|
+
def initialize: (untyped blk, untyped elements) -> untyped
|
32
|
+
|
33
|
+
def update_element: (untyped name, untyped value) -> untyped
|
34
|
+
|
35
|
+
def each: () ?{ (?) -> untyped } -> untyped
|
36
|
+
|
37
|
+
def find_attribute: (untyped name) -> untyped
|
38
|
+
|
39
|
+
def []: (untyped name) -> untyped
|
40
|
+
|
41
|
+
def []=: (untyped name, untyped value) -> untyped
|
42
|
+
|
43
|
+
def keys: () -> untyped
|
44
|
+
|
45
|
+
def values: () -> untyped
|
46
|
+
|
47
|
+
def to_h: () -> untyped
|
48
|
+
|
49
|
+
def inspect: () -> untyped
|
50
|
+
end
|
51
|
+
|
52
|
+
class Attribute < Element
|
53
|
+
def write_ole: (untyped value) -> untyped
|
54
|
+
|
55
|
+
def read_ole: (untyped value) -> untyped
|
56
|
+
|
57
|
+
def key: () -> untyped
|
58
|
+
|
59
|
+
def value: () -> untyped
|
60
|
+
|
61
|
+
def inspect: () -> untyped
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Generated from lib/autocad/block_reference.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class BlockReference < Element
|
5
|
+
def each: () -> untyped
|
6
|
+
|
7
|
+
def coordinates: () -> untyped
|
8
|
+
|
9
|
+
def has_attributes?: () -> untyped
|
10
|
+
|
11
|
+
def name: () -> untyped
|
12
|
+
|
13
|
+
def layout?: () -> untyped
|
14
|
+
|
15
|
+
def attribute_hash: () -> untyped
|
16
|
+
|
17
|
+
def inspect: () -> untyped
|
18
|
+
|
19
|
+
def attributes: () -> untyped
|
20
|
+
end
|
21
|
+
|
22
|
+
class Attributes
|
23
|
+
include Enumerable
|
24
|
+
|
25
|
+
attr_reader elements: untyped
|
26
|
+
|
27
|
+
def initialize: (untyped blk, untyped elements) -> untyped
|
28
|
+
|
29
|
+
def update_element: (untyped name, untyped value) -> untyped
|
30
|
+
|
31
|
+
def each: () ?{ (?) -> untyped } -> untyped
|
32
|
+
|
33
|
+
def find_attribute: (untyped name) -> untyped
|
34
|
+
|
35
|
+
def []: (untyped name) -> untyped
|
36
|
+
|
37
|
+
def []=: (untyped name, untyped value) -> untyped
|
38
|
+
|
39
|
+
def keys: () -> untyped
|
40
|
+
|
41
|
+
def values: () -> untyped
|
42
|
+
|
43
|
+
def to_h: () -> untyped
|
44
|
+
|
45
|
+
def inspect: () -> untyped
|
46
|
+
end
|
47
|
+
|
48
|
+
class Attribute < Element
|
49
|
+
def write_ole: (untyped value) -> untyped
|
50
|
+
|
51
|
+
def read_ole: (untyped value) -> untyped
|
52
|
+
|
53
|
+
def key: () -> untyped
|
54
|
+
|
55
|
+
def value: () -> untyped
|
56
|
+
|
57
|
+
def inspect: () -> untyped
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,158 @@
|
|
1
|
+
# Generated from lib/autocad/drawing.rb with RBS::Inline
|
2
|
+
|
3
|
+
module Autocad
|
4
|
+
class Drawing
|
5
|
+
include Common
|
6
|
+
|
7
|
+
attr_reader app: untyped
|
8
|
+
|
9
|
+
def self.from_ole_obj: (untyped app, untyped ole) -> Drawing
|
10
|
+
|
11
|
+
def initialize: (untyped app, untyped ole) -> untyped
|
12
|
+
|
13
|
+
def event_handler: () -> EventHandler
|
14
|
+
|
15
|
+
def default_event_handler: () -> untyped
|
16
|
+
|
17
|
+
def app_ole: () -> untyped
|
18
|
+
|
19
|
+
# @rbs return SelectionSetAdapter
|
20
|
+
def create_selection_set: (untyped name) -> SelectionSetAdapter
|
21
|
+
|
22
|
+
# register an handler
|
23
|
+
#
|
24
|
+
# @rbs event: String -- event key for handler
|
25
|
+
# @rbs &: {() -> void} - handler Proc
|
26
|
+
def register_handler: (String event) ?{ (?) -> untyped } -> void
|
27
|
+
|
28
|
+
def read_only?: () -> untyped
|
29
|
+
|
30
|
+
def previously_saved?: () -> untyped
|
31
|
+
|
32
|
+
def modified?: () -> untyped
|
33
|
+
|
34
|
+
def save: (?name: untyped, ?dir: untyped) -> void
|
35
|
+
|
36
|
+
def dwg_path: (?name: untyped, ?dir: untyped) -> untyped
|
37
|
+
|
38
|
+
def dwg_name: (untyped name) -> untyped
|
39
|
+
|
40
|
+
# save the drawing as a pdf file
|
41
|
+
# if the name or directory is given it uses
|
42
|
+
# those params. If not it uses the drawing name
|
43
|
+
# and the drawing directory
|
44
|
+
# @rbs name: String? - the name of the file
|
45
|
+
# @rbs dir: String? - the directory to save the drawing
|
46
|
+
def save_as_pdf: (?name: String?, ?dir: String?, ?model: untyped) -> void
|
47
|
+
|
48
|
+
def pdf_path: (?name: untyped, ?dir: untyped) -> untyped
|
49
|
+
|
50
|
+
# Return the pdf name for the drawing.
|
51
|
+
#
|
52
|
+
# If a name is provided use the name provided otherwise use the drawing name
|
53
|
+
#
|
54
|
+
# @rbs name: String | nil -- change ext to pdf and return Pathname from
|
55
|
+
# the name or drawing name
|
56
|
+
def pdf_name: (?String | nil name) -> Pathname
|
57
|
+
|
58
|
+
# copy the drawing
|
59
|
+
# @rbs name: String | Pathname --name of the file
|
60
|
+
# @rbs dir: String|Pathname -- dir
|
61
|
+
def copy: (?name: String | Pathname, ?dir: String | Pathname) -> void
|
62
|
+
|
63
|
+
# If you copy the file the name to use
|
64
|
+
# @rbs backup_str: String -- the bqckup string to use for copies
|
65
|
+
def copy_name: (?String backup_str) -> untyped
|
66
|
+
|
67
|
+
def paper_space?: () -> bool
|
68
|
+
|
69
|
+
def model_space?: () -> bool
|
70
|
+
|
71
|
+
def to_paper_space: () -> void
|
72
|
+
|
73
|
+
def to_model_space: () -> void
|
74
|
+
|
75
|
+
# @rbs return String -- the name of the drawing
|
76
|
+
def name: () -> String
|
77
|
+
|
78
|
+
# @rbs return Pathname -- the name as Pathname
|
79
|
+
def basename: () -> Pathname
|
80
|
+
|
81
|
+
# @rbs return Pathname -- the directory of the file
|
82
|
+
def dirname: () -> Pathname
|
83
|
+
|
84
|
+
# @rbs return Pathname -- the complete path of file
|
85
|
+
def path: () -> Pathname
|
86
|
+
|
87
|
+
def print_pdf: (untyped print_path, ?model: untyped) -> untyped
|
88
|
+
|
89
|
+
def pdf_plot_config: () -> untyped
|
90
|
+
|
91
|
+
def active_layer: () -> untyped
|
92
|
+
|
93
|
+
def active_space: () -> untyped
|
94
|
+
|
95
|
+
# Close the drawing
|
96
|
+
# @rbs save: bool -- whether to save the drawing
|
97
|
+
def close: (?bool save) -> untyped
|
98
|
+
|
99
|
+
# @rbs name: String -- selection set name to return
|
100
|
+
# @rbs return SelectionSet | nil
|
101
|
+
def get_selection_set: (String name) -> (SelectionSet | nil)
|
102
|
+
|
103
|
+
# @rbs name: String -- selection set name to return
|
104
|
+
# @rbs return SelectionSet | nil
|
105
|
+
def get_ole_selection_set: (String name) -> (SelectionSet | nil)
|
106
|
+
|
107
|
+
# @rbs return Enumerator[Block]
|
108
|
+
# @rbs &: (Block) -> void
|
109
|
+
def blocks: () { (Block) -> void } -> Enumerator[Block]
|
110
|
+
|
111
|
+
# @rbs return Enumerator[Layer]
|
112
|
+
# @rbs &: (Layer) -> void
|
113
|
+
def layers: () { (Layer) -> void } -> Enumerator[Layer]
|
114
|
+
|
115
|
+
def linetypes: () -> untyped
|
116
|
+
|
117
|
+
# @rbs name: String -- layer name to create
|
118
|
+
# @rbs return Acad::Layer
|
119
|
+
def create_layer: (String name) -> Acad::Layer
|
120
|
+
|
121
|
+
def ole_selection_sets: () -> untyped
|
122
|
+
|
123
|
+
# @rbs name: String -- the name to call new selection set
|
124
|
+
# @rbs return Autocad::SelectionSet | nil
|
125
|
+
def create_selection_set: (String name, ?filter: untyped) -> (Autocad::SelectionSet | nil)
|
126
|
+
|
127
|
+
# @rbs message: String -- the String to put in Autocad prompt
|
128
|
+
def prompt: (String message) -> untyped
|
129
|
+
|
130
|
+
# @rbs prompt: String -- the string to prompt the user for String
|
131
|
+
# @rbs has_spaces: bool -- whether the string returned can contain spaces
|
132
|
+
def get_input_string: (?prompt: String, ?spaces: untyped) -> untyped
|
133
|
+
|
134
|
+
# @rbs prompt: String -- the string to prompt the user for Integer
|
135
|
+
def get_input_integer: (?prompt: String) -> untyped
|
136
|
+
|
137
|
+
# In a running Autocad instance, prompts the user for a point.
|
138
|
+
# Uses the prompt argument as the prompt string.
|
139
|
+
# If base_point is provided, it is used as the base point and a
|
140
|
+
# stretched line is drawn from the base point to the returned point.
|
141
|
+
# @rbs prompt: String
|
142
|
+
# @rbs base_point: Array, Point3d, nil
|
143
|
+
# @rbs return [Point3d]
|
144
|
+
def get_point: (?prompt: String, ?base_point: Array) -> [ Point3d ]
|
145
|
+
|
146
|
+
# @rbs return Enumerator[SelectionSet] | void
|
147
|
+
# @rbs &: (SelectionSet) -> void
|
148
|
+
def selection_sets: () { (SelectionSet) -> void } -> (Enumerator[SelectionSet] | void)
|
149
|
+
|
150
|
+
def model_space: () -> untyped
|
151
|
+
|
152
|
+
def paper_space: () -> untyped
|
153
|
+
|
154
|
+
def utility: () -> untyped
|
155
|
+
|
156
|
+
def ole_obj: () -> untyped
|
157
|
+
end
|
158
|
+
end
|
@@ -0,0 +1,166 @@
|
|
1
|
+
# Generated from lib/autocad/element.rb with RBS::Inline
|
2
|
+
|
3
|
+
class WIN32OLE
|
4
|
+
def to_ole: () -> untyped
|
5
|
+
end
|
6
|
+
|
7
|
+
module Autocad
|
8
|
+
end
|
9
|
+
|
10
|
+
module Autocad
|
11
|
+
module ElementTrait
|
12
|
+
#
|
13
|
+
#
|
14
|
+
#
|
15
|
+
# @rbs return bool -- true if ole type is Text
|
16
|
+
def text?: () -> bool
|
17
|
+
|
18
|
+
# @rbs return bool -- true if ole type is TextNode
|
19
|
+
def text_node?: () -> bool
|
20
|
+
|
21
|
+
def has_tags?: () -> untyped
|
22
|
+
|
23
|
+
def to_ole: () -> untyped
|
24
|
+
|
25
|
+
# @rbs return bool -- true if object is of type cell
|
26
|
+
def cell?: () -> bool
|
27
|
+
|
28
|
+
def complex?: () -> untyped
|
29
|
+
|
30
|
+
# @rbs return bool -- true if Text or TextNode
|
31
|
+
def textual?: () -> bool
|
32
|
+
|
33
|
+
def autocad_id: () -> untyped
|
34
|
+
|
35
|
+
def visible?: () -> untyped
|
36
|
+
|
37
|
+
# @rbs return bool -- true if ole type is TypeLine
|
38
|
+
def line?: () -> bool
|
39
|
+
|
40
|
+
def graphical?: () -> untyped
|
41
|
+
|
42
|
+
def inspect: () -> untyped
|
43
|
+
|
44
|
+
def parent: () -> untyped
|
45
|
+
|
46
|
+
def id_from_record: (untyped id) -> untyped
|
47
|
+
|
48
|
+
def select: () -> untyped
|
49
|
+
|
50
|
+
def autocad_type: () -> untyped
|
51
|
+
|
52
|
+
def model: () -> untyped
|
53
|
+
end
|
54
|
+
|
55
|
+
class Element
|
56
|
+
include ElementTrait
|
57
|
+
|
58
|
+
def self.convert_item: (untyped ole, untyped app, ?untyped cell) -> untyped
|
59
|
+
|
60
|
+
def self.ole_object?: () -> untyped
|
61
|
+
|
62
|
+
attr_reader ole_obj: untyped
|
63
|
+
|
64
|
+
attr_reader app: untyped
|
65
|
+
|
66
|
+
attr_reader acad_type: untyped
|
67
|
+
|
68
|
+
attr_reader original: untyped
|
69
|
+
|
70
|
+
def initialize: (untyped ole, untyped app, untyped typ, ?untyped cell) -> untyped
|
71
|
+
|
72
|
+
def in_cell?: () -> untyped
|
73
|
+
|
74
|
+
def read_ole: (untyped ole) -> untyped
|
75
|
+
|
76
|
+
def write_ole: (untyped value) -> untyped
|
77
|
+
|
78
|
+
def method_missing: (untyped meth, *untyped) ?{ (?) -> untyped } -> untyped
|
79
|
+
|
80
|
+
def get_property_handler: () -> untyped
|
81
|
+
|
82
|
+
def property_handler: () -> untyped
|
83
|
+
|
84
|
+
def []: (untyped name) -> untyped
|
85
|
+
|
86
|
+
def do_update: (untyped value) -> untyped
|
87
|
+
|
88
|
+
def update: (untyped value) -> untyped
|
89
|
+
|
90
|
+
def updated?: () -> untyped
|
91
|
+
|
92
|
+
def redraw: (?untyped el) -> untyped
|
93
|
+
|
94
|
+
def app_ole_obj: () -> untyped
|
95
|
+
|
96
|
+
def delete: () -> untyped
|
97
|
+
|
98
|
+
def clone: (untyped new_insertion_point) -> untyped
|
99
|
+
|
100
|
+
def move_x: (untyped amt) -> untyped
|
101
|
+
|
102
|
+
def move_y: (untyped amt) -> untyped
|
103
|
+
|
104
|
+
def move: (untyped x, untyped y) -> untyped
|
105
|
+
|
106
|
+
def move_ole: (untyped pt1, untyped pt2) -> untyped
|
107
|
+
|
108
|
+
def ole_cell: (untyped ole) -> untyped
|
109
|
+
|
110
|
+
def each_complex: (untyped ole) ?{ (?) -> untyped } -> untyped
|
111
|
+
end
|
112
|
+
|
113
|
+
class App
|
114
|
+
def ole_to_ruby: (untyped ole) -> untyped
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
module Autocad
|
119
|
+
class Arc < Element
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
module Autocad
|
124
|
+
class Ellipse < Element
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
module Autocad
|
129
|
+
class BSplineSurface < Element
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
module Autocad
|
134
|
+
class Linetype < Element
|
135
|
+
CONTINUOUS: ::String
|
136
|
+
|
137
|
+
DASHED: ::String
|
138
|
+
|
139
|
+
CENTER: ::String
|
140
|
+
|
141
|
+
HIDDEN: ::String
|
142
|
+
|
143
|
+
PHANTOM: ::String
|
144
|
+
|
145
|
+
BREAK: ::String
|
146
|
+
|
147
|
+
BORDER: ::String
|
148
|
+
|
149
|
+
DOT2: ::String
|
150
|
+
|
151
|
+
DOTX2: ::String
|
152
|
+
|
153
|
+
DIVIDE: ::String
|
154
|
+
|
155
|
+
TRACKING: ::String
|
156
|
+
|
157
|
+
DASHDOT: ::String
|
158
|
+
|
159
|
+
def name: () -> untyped
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
module Autocad
|
164
|
+
class BSplineCurve < Element
|
165
|
+
end
|
166
|
+
end
|