Module: Microstation::TagSetTrait

Included in:
Drawing
Defined in:
lib/microstation/tag_set_trait.rb

Instance Method Summary collapse

Instance Method Details

#create_tagset(name, &block) ⇒ Object



18
19
20
21
22
23
# File 'lib/microstation/tag_set_trait.rb', line 18

def create_tagset(name,&block)
  ts = tagsets.create(name)
  reset_tagsets
  block.call ts if block
  ts
end

#create_tagset!(name, &block) ⇒ Object



25
26
27
28
# File 'lib/microstation/tag_set_trait.rb', line 25

def create_tagset!(name,&block)
  remove_tagset(name)
  create_tagset(name,&block)
end

#find_tagset(name) ⇒ Object



35
36
37
# File 'lib/microstation/tag_set_trait.rb', line 35

def find_tagset(name)
  tagsets[name]
end

#remove_tagset(name) ⇒ Object



30
31
32
33
# File 'lib/microstation/tag_set_trait.rb', line 30

def remove_tagset(name)
  tagsets.remove(name)
  reset_tagsets
end

#reset_tagsetsObject



13
14
15
16
# File 'lib/microstation/tag_set_trait.rb', line 13

def reset_tagsets
  @tagsets = nil
  tagsets
end

#tagset_namesObject



9
10
11
# File 'lib/microstation/tag_set_trait.rb', line 9

def tagset_names
  tagsets.map{|ts| ts.name}
end

#tagsetsObject



5
6
7
# File 'lib/microstation/tag_set_trait.rb', line 5

def tagsets
  @tagsets ||= TagSets.new(self,ole_obj_tagsets)
end