How to reload a extension loader file?

How to reload a extension loader file?

Postby wikii » Mon Nov 19, 2018 8:39 am

Hi all.

I need to reload a rb file,But I get some error in the ruby control panel.

"Extension loader file XXX.rb can not be loaded because an extension loader file with the same name was previously loaded."

How to reload a extension loader file?

thanks !

wikii
0

wikii 
PluginStore Author
PluginStore Author
 

Re: How to reload a extension loader file?

Postby wikii » Mon Dec 31, 2018 4:37 pm

need help!

thanks!
0

wikii 
PluginStore Author
PluginStore Author
 

Re: How to reload a extension loader file?

Postby TIG » Mon Dec 31, 2018 5:01 pm

You'll have to restart SketchUp to get your Extension to be reformed.
However, if you simply want to reload its main code file[s] from inside its folder, use:
load "XXX/XXX_code.rb"
Change it to suit the actual file-name...
1
TIG
User avatar
TIG 
Global Moderator
 

Re: How to reload a extension loader file?

Postby wikii » Mon Dec 31, 2018 11:39 pm

TIG wrote:You'll have to restart SketchUp to get your Extension to be reformed.
However, if you simply want to reload its main code file[s] from inside its folder, use:
load "XXX/XXX_code.rb"
Change it to suit the actual file-name...


I get it.
thankyou,TIG。

happy new year!

wikii
0

wikii 
PluginStore Author
PluginStore Author
 

Re: How to reload a extension loader file?

Postby rami_lpm » Fri Jun 14, 2019 2:05 pm

I use this.

Code: Select all
def self.reload()
   Sketchup.send_action(CMD_RUBY_CONSOLE)
   load __FILE__
   puts "reloaded #{__FILE__.to_s}\n"
end
0
User avatar
rami_lpm 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 4 guests

Visit our sponsors: