Check which plugins are enabled in Preferences->Extensions
-
I am trying to check which plugins are enabled in the Preferences->Extensions menu. The following code seems like it should work to me (it asks for variables that are in the registry, the checked plugins have value 1 and the unchecked ones have value 0) but it doesn't work (at least on Windows with SU 7). Does anyone know if we are blocked from reading/writing to the Extensions preferences? Is there another way to check if another plugin is enabled?
ObjectSpace.each_object(SketchupExtension) do |p|
variable = "#{p.name}"
puts variable
puts Sketchup.read_default("Extensions", variable, nil)
variable = "#{p.name}#{p.version}"
puts variable
puts Sketchup.read_default("Extensions", variable, nil)
endThanks a lot,
Dan -
Sketchup.read_default
Does appear to be limited, it won't read any Windows settings, nor SketchUp settings.
Advertisement