Method: Microstation::Drawing#find_model

Defined in:
lib/microstation/drawing.rb

#find_model(name) ⇒ Model?

Find the model in the drawing

Parameters:

  • name (String)
    • the name of the model

Returns:

  • (Model, nil)

    the model or nil if not found



329
330
331
332
333
334
335
# File 'lib/microstation/drawing.rb', line 329

def find_model(name)
  ole = ole_obj.Models(name)
  model_from_ole(ole)
rescue
  puts "model #{name} not found"
  nil
end