An extension of mine uses a Require command to search out a file on the user’s computer and load/run it in the model. The require command successfully loads/runs the file the first time, but when I try to use require to load/run the same file again it does not work. I tested this by running the Require command twice in a row and returning the status of each of the loads. The first one always comes back as “True” and the second status check always comes back as “False”.
The absolute path of the loaded file is added to
$"). A file will not be loaded again if its path already appears in
$". For example,
require 'a'; require './a'will not load
Does this mean that I somehow need to clear out the Loaded_Features? If this is correct, is there some ruby code that will allow me to do that without erasing my model?
Basically, I’m looking for a way to be able to use the Require command on the same file path more than once in the same SketchUp session.
Any help would be greatly appreciated.