Okay, I have further problems... Let me explain, what I want to do....
I would like to do a list of "projects". So, when someone add a project, a new option key will insert. The name of the key: "M2GC_projects_" << projectName
So, at the end, I have a list of all projects by checking of the optionsProvider.
` optionsManager = Sketchup.active_model.options
optionsProvider = optionsManager["NamedOptions"]
optionsProviderKeys = optionsProvider.keys
projectName = dlg.get_element_value("projectName").delete("^a-zA-Z0-9");
if (projectName != "" && !optionsProviderKeys.include?("M2GC_projects_" << projectName))
optionsProvider["M2GC_projects_" << projectName] = ""
dlg.execute_script("addToProjectList('" + projectName + "')")
dlg.execute_script("document.getElementById('projectName').value=\"\"")
else
UI.messagebox "Project name already in use"
end`
It sounds very strange, but I am able to insert just ONE key each "session". So, I try to insert several keys => no error in the ruby console. Now I save the Sketchup file. Close Sketchup. Open Sketchup again... just the first inserted key is now available. Now, I can insert a second value... by reopen Sketchup, both are now available...
Guys - whats happening here?! I'm totally confused...
Thanks for your help!