Hi, I tried installing this plugin like what the instruction said in the readme file
Plugins\city_gen.rb <- Core CityGen file
Plugins\Gity_Gen\street_gen.rb <- Core Street Generator module file - loaded by city_gen.rb
Plugins\City_Gen\Street_Gen\ <- Street Generator's support folder
But, I still get the File cannot load error "Even the file is in the correct folder".. Is there a way to fix it?
@thomthom said:
This plugin is a work in progress. It's made public because it is a collaboration project.
This is in it's very early beginning, so lots of things will change, and lots of bugs are to be expected. Feel free to share your ideas or join in on this project. See this thread for the discussion of the overall project. This thread is an overview of the related modules and the development thread for the core files.
CityGen - Core
Core and Installation Check
This is the main file that centralise information and load the other modules.
Modules are located in Plugins\CityGen\modules\.
Please remove any old CityGen installations prior to installing.
Menu entry is located under the Tools menu. Should this be under Plugins you think?
Modules
For Module Developers
Core and Installation Check
You can add this code to your module to check if the core is installed and that the module is installed in the correct location.
> ### CORE & INSTALLATION CHECK ### ------------------------------------------------------------------
> # Core check
> if not file_loaded?('city_gen.rb')
> if Sketchup.find_support_file('city_gen.rb', 'Plugins') == nil
> UI.messagebox('The CityGen\'s core files is missing. Install the required core files.')
> else
> UI.messagebox('The CityGen\'s core files is not loaded. Ensure you installed this plugin correctly.')
> end
> raise 'CityGen Core error.'
> end
> # Correct installation check
> if Sketchup.find_support_file('City_Gen/' + File.basename(__FILE__), 'Plugins') == nil
> UI.messagebox("This module (#{File.basename(__FILE__)}) has not been installed properly. It should be installed under Plugins\\City_Gen\\")
> raise 'CityGen Module path error.'
> end
>
> module City_Gen
> module Some_Module
> # stuff
> end
> end
>
> # CHANGELOG
> # 0.1.0a - 31.05.2009 (Thom)
> # * Initial build.
> #
> # 0.1.1a - 31.05.2009 (Thom)
> # * Change in the module error checking routine.
> #
> # 0.1.2a - 31.05.2009 (Thom)
> # * Added version constant.
> #
> # 0.1.3a - 31.05.2009 (Thom)
> # * Updated to the new file structure for use with Tortoise.
>