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:
model = Sketchup.active_model
shadowinfo = model.shadow_info
UI.messagebox("My city is: " + shadowinfo["City"].to_s)The [] method retrieves a value from the array of keys
Arguments:
Returns:
value = shadowinfo["key"]
The set value []= method is used to set the value in the array of shadow info options.
Arguments:
Returns:
model = Sketchup.active_model shadowinfo = model.shadow_info value = shadowinfo["City"] UI.messagebox value value = shadowinfo["City"]="Denver, CO" UI.messagebox value
The add_observer method is used to add an observer to the current object.
Arguments:
Returns:
status = object.add_observer observer
The each method iterates through all of the shadow information key/value pairs.
Arguments:
Returns:
model = Sketchup.active_model
shadowinfo = model.shadow_info
shadowinfo.each { |key, value|
UI.messagebox(key.to_s + '=' + value.to_s)
}The each_key method iterates through all of the shadow information keys.
Arguments:
Returns:
shadowinfo.each_key { |key| UI.messagebox(key) }An alias for each. See ShadowInfo.each.
Returns:
model = Sketchup.active_model
shadowinfo = model.shadow_info
shadowinfo.each_pair { |key, value|
UI.messagebox(key.to_s + '=' + value.to_s)
}The keys method is a class method that returns an array with all of the attribute keys
Returns:
keys = Sketchup::ShadowInfo.keys
The remove_observer method is used to remove an observer from the current object.
Arguments:
Returns:
status = object.remove_observer observer