Page 4 of 4

Re: Octane Sketchup Exporter - Full 1022-06

PostPosted: Sun Sep 19, 2010 8:29 pm
by TIG
I have the next version nearly ready... But I' unsure if it'll fix these things...

When you try to run the Exporter in v8 with the Ruby Console open what happens - any error messages ?

Can you also try typing the word octane + <enter-key> [all lowercase letters] into the ruby Console too and report back too.

:?

Re: Octane Sketchup Exporter - Full 1022-06

PostPosted: Sun Sep 19, 2010 9:16 pm
by DigitalDouble
Ruby console ouput when trying to launch Octane plugin

Error: #<NoMethodError: undefined method `tr!' for nil:NilClass>
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:234:in `activate'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2860:in `select_tool'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2860:in `octane'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2872


Typing octane in the Ruby console:

octane
Error: #<Exception: Invalid Dialog>
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2288:in `get_element_value'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2288:in `getIDvalues'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2288:in `each'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2288:in `getIDvalues'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:247:in `deactivate'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2860:in `select_tool'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2860:in `octane'
(eval):234
Error: #<NoMethodError: undefined method `tr!' for nil:NilClass>
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:234:in `activate'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:255:in `select_tool'
C:/Program Files/Google/Google SketchUp 8/Plugins/Octane/Octane_1022.rb:2860:in `octane'
(eval):234
#<Sketchup::Model:0xc5effb8>

I also tried to switch Internet Explorer to be the default browser - it didn't help either.

Re: Octane Sketchup Exporter - Full 1022-06

PostPosted: Mon Sep 20, 2010 11:51 am
by TIG
The line #234 tr! error is because it's trying to do something to the 'project_name' and it's set to be 'nil' :?

If the project is not saved it should warn you then exit.
If the project was saved but it has never had 'Octane' values added then it uses the model.title [with illegal characters made into _] as the dialog's 'project_name' value.
If the project was saved and has 'Octane' values then the 'project_name' is set to be what it was last saved as.

Let's see what we have...
In an existing project please copy/paste this into the Ruby Console and report

Sketchup.active_model.title

then

Sketchup.active_model.title.tr(" ","_")

then

Sketchup.active_model.title.tr(" ","_").gsub(/[^A-Za-z0-9_\-]/,'_')


I suspect that your 'Octane' model's attribute_dictionary could be corrupted and returning odd values.
In an existing project, copy/paste this line into the Ruby Console [without having tried the Exporter tool beforehand]

Sketchup.active_model.attribute_dictionary("Octane").each{|k,v|puts "'"+k+"'='"+v.to_s+"'"}

and see what values you get listed - post them...

You can also try using the following line of code to clear the dictionaries values...

ad=Sketchup.active_model.attribute_dictionary("Octane");ad.each{|k,v|ad.delete_key(k)}

Repeat the code

Sketchup.active_model.attribute_dictionary("Octane").each{|k,v|puts "'"+k+"'='"+v.to_s+"'"}

and you should get 'nil'

Then try the Exporter - what happens ?

Now repeat the code

Sketchup.active_model.attribute_dictionary("Octane").each{|k,v|puts "'"+k+"'='"+v.to_s+"'"}

What happens now ?

The other message about 'invalid dialog' only occurs because the process aborts early due to the preceding 'tr' issue and there is no dialog to tidy at the 'deactivate' stage...