Method: Microstation::TextNode#write_ole_in_cell

Defined in:
lib/microstation/text_node.rb

#write_ole_in_cell(text) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/microstation/text_node.rb', line 51

def write_ole_in_cell(text)
  orig_ole = ole_obj
  new_text_ole = ole_obj.Clone
  new_text_ole.DeleteAllTextLines
  text.each_line do |line|
    new_text_ole.AddTextLine(line)
  end
  @ole_obj = new_text_ole
rescue => e
  @ole_obj = orig_ole
end