Name : SetArcCircleDefaults
Description : When SketchUp loads, this script selects the circle tool and changes the number of sides to the circle (to predifined user preference), then selects the arc tool and changes the segments in the arc (also to user preference). This way it effectively sets their "defaults" (to lower or higher numbers) according to user preference. As this script comes "shipped", it sets the sides of a circle to 12, and the segments in an arc to 6.
(The defaults for sides of a circle and segments in an arc could be directly set via SketchUp's Ruby API.. if it let you do that. It doesn't as of SU V8.)
This script requires the eventrelay plugin (windows only at this writing), or EventRelay.dll, and includes a version of that .dll known at this writing to work. eventrelay is available at [http://code.google.com/p/eventrelay/](http://code.google.com/p/eventrelay/)
Author : Alex Hall (c) 2011
[http://blog.openhatch.net/contact/](http://blog.openhatch.net/contact/)
Released under the GNU GPL v2
Installation: At this writing, and unless eventrelay is ported to the Macintosh, this plugin is for Windows only. Copy these files into the [Sketchup Plugins directory](http://forums.sketchucation.com/search.php?keywords):
EventRelay.dll
SetArcCircleDefaults.rb
setArcCircleDefaults-config.txt
(For example, Google Sketchup 8's plugin directory on Windows 7 defaults to: "C:\Program Files (x86)\Google\Google SketchUp 8\Plugins" - copy these files there in that case. Then, start Sketchup. For help finding the plugin directory look in the forums: [http://forums.sketchucation.com/search.php?keywords=plugin+folder+OR+directory](http://forums.sketchucation.com/search.php?keywords=plugin+folder+OR+directory) )
Usage : To alter the "defaults" which the script sets for sides of a circle and segments of an arc, go to the "Plugins->Set Circle and Arc Segments Defaults", enter the desired values in the popup box, and click "OK".
POSSIBLE CAVEAT: If you select any window besides SketchUp while SketchUp is loading, it may type key-presses to change these settings into some document or web browser text box etc. It *seems* the script avoids that by typing an inert {TAB} key, but if your set "defaults" for the Circle and Arc tool don't load with SketchUp, make sure you don't select any other windows after starting SketchUp to load.
You could also modify the script to exploit any of the functionality of the eventrelay plugin.
For defaults, numbers divisible by four may be advisable, as they will provide vertices at right angles along the perimiter of the circle, which makes for easy rotation and geometric snapping/angular construction.
Future plans: possible exception handling for any errors related to config file.
Version history:
**[UPDATE]** 1.1 Revamped from scratch, incorporating suggestions by AlexMozg. Added config storage to setArcCircleDefaults-config.txt file in plugin directory (with setting via "Plugins->Set Circle and Arc Segments Defaults" menu.)
1.0 08/11 Planned updates : none. Could have menu option to alter and store "defaults"; not programming that. Anyone else is free to.
Zip archive of files for Set Arc and Circle Defaults plugin.