I typically use this piece of code to load up other extension files:
this_dir=File.dirname(__FILE__)
# Fix for ruby 2.0
if this_dir.respond_to?(:force_encoding)
this_dir=this_dir.dup.force_encoding("UTF-8")
end
# Read Dictionary Attributes
Sketchup.load(File.join(this_dir,"MEDEEK_RECT_WALL_DICTIONARY.rbs"))
I am wondering if I should be checking to see if the file is already loading prior to actually loading it?
If a file has been already loaded and you load it again what are the implications if any?
If a file has already been loaded then the 2 former methods return false. If it’s the first request to load a file and the file loads successfully, then true is returned.