class Sketchup::ShadowInfo

The ShadowInfo class contains method to extract the shadow information for a model. The majority of the shadow information returned exists in the Model Info > Location and Model Info > Shadows dialogs inside SketchUp.

The following shadow information keys are maintained in SketchUp:

You access the ShadowInfo object by calling Model.shadow_info:

@example

model = Sketchup.active_model
shadowinfo = model.shadow_info
UI.messagebox("My city is: " + shadowinfo["City"].to_s)

@version SketchUp 6.0

Public Class Methods

each_key() click to toggle source

The each_key method iterates through all of the shadow information keys.

@example

shadowinfo.each_key { |key| puts key }

@return [nil]

@version SketchUp 6.0

@yield [key] Variable to hold each key as they are found.

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 60
def self.each_key
end
keys() click to toggle source

The keys method is a class method that returns an array with all of the attribute keys

@example

keys = Sketchup::ShadowInfo.keys

@return [Array<String>] an array of keys

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 72
def self.keys
end

Public Instance Methods

[](key) click to toggle source

The [] method retrieves a value from the array of keys

@example

value = shadowinfo["key"]

@param [String] key

The key of the shadowinfo value to retrieve.

@return [Object, nil] the value that is retrieved.

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 88
def [](key)
end
[]=(key, value) click to toggle source

The set value []= method is used to set the value in the array of shadow info options.

@example

model = Sketchup.active_model
shadowinfo = model.shadow_info
value = shadowinfo["City"]
UI.messagebox value
value = shadowinfo["City"]="Denver, CO"
UI.messagebox value

@param [String] key

The key of the shadowinfo value to set.

@param [Object] value

The value to be set.

@return [Object] the value that was set if successful, or false

if unsuccessful.

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 112
def []=(key, value)
end
add_observer(observer) click to toggle source

The add_observer method is used to add an observer to the current object.

@example

status = object.add_observer observer

@param [Object] observer

An observer.

@return [Boolean] true if successful, false if unsuccessful.

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 126
def add_observer(observer)
end
count() click to toggle source

The count method is inherited from the Enumerable mix-in module.

@example

shadow_info = Sketchup.active_model.shadow_info
number = shadow_info.count

@return [Integer]

@version SketchUp 2014

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 138
def count
end
each() click to toggle source

The {#each} method iterates through all of the shadow information key/value pairs.

@example

model = Sketchup.active_model
shadow_info = model.shadow_info
shadow_info.each { |key, value|
  puts "#{key} : #{value}"
}

@return [nil]

@see each_pair

@version SketchUp 6.0

@yield [key, value]

@yieldparam [String] key

@yieldparam [Object] value

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 162
def each
end
each_key() click to toggle source

The each_key method iterates through all of the shadow information keys.

@example

shadowinfo.each_key { |key| puts key }

@return [nil]

@version SketchUp 6.0

@yield [key] Variable to hold each key as they are found.

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 175
def each_key
end
each_pair() click to toggle source

The {#each_pair} method is an alias for {#each}.

@example

model = Sketchup.active_model
shadow_info = model.shadow_info
shadow_info.each_pair { |key, value|
  puts "#{key} : #{value}"
}

@return [nil]

@see each

@version SketchUp 6.0

@yield [key, value]

@yieldparam [String] key

@yieldparam [Object] value

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 198
def each_pair
end
keys() click to toggle source

The keys method is a class method that returns an array with all of the attribute keys

@example

keys = Sketchup::ShadowInfo.keys

@return [Array<String>] an array of keys

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 210
def keys
end
length() click to toggle source

The {#length} method returns the number of options in the shadow options collection

@example

shadow_info = Sketchup.active_model.shadow_info
number = shadow_info.length

@return [Integer]

@see size

@version SketchUp 2014

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 225
def length
end
remove_observer(observer) click to toggle source

The remove_observer method is used to remove an observer from the current object.

@example

status = object.remove_observer observer

@param [Object] observer

An observer.

@return [Boolean] true if successful, false if unsuccessful.

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 240
def remove_observer(observer)
end
size() click to toggle source

The {#size} method is an alias for {#length}.

@example

shadow_info = Sketchup.active_model.shadow_info
number = shadow_info.size

@return [Integer]

@see length

@version SketchUp 2014

# File lib/sketchup-api-stubs/stubs/Sketchup/ShadowInfo.rb, line 254
def size
end