ModelProperties.swp Copyright 2003 Leonard Kikstra                   09/15/2004

Dowloaded from KIKSTRA SolidWorks Resources
	http://webpages.charter.net/mkikstra/SolidWorks.html
-------------------------------------------------------------------------------

INTRODUCTION:
ModelProperties is a nice tool to dynamically change the base color of 
SolidWorks part models, individually or multiple parts within an assembly.  
This macro incorporates a user customizable external data file to allow the 
user to add their own custom model colors to the selection buttons.  This 
macro can also manage multiple color lists if needed.  User also has option to 
apply color to shaded, wireframe or both.

ModelProperties also gives you the option to remove 'Face properties' colors.
Note: When used in large assemblies, this process can take a long time because 
the macro has to load each part, traverse all faces of the bodies within 
the part, and close the part (without saving).

USE WITHIN AN ASSEMBLY:
  * Sub-components must be resolved.  This macro will not process lightweight
    components.
  * Without any preselection, this macro will attempt to process all parts in 
    all levels of the assembly.
  * With preselection, this macro will attempt to process all selected 
    components and/or assemblies.  
  * Valid Selections:
     -> Feature Tree:    Components or Assemblies only.
     -> Graphics Window: Model Faces, Edges and Verticies.
  * To select different models, you must close and re-launch the macro.

The models are not saved by this macro.  This macro should be safe to use to 
change a model for temporary purposed.

This macro is provided as an example of using the SolidWorks API and VBA to 
read and change SolidWorks model settings. 

-------------------------------------------------------------------------------

REVISION HISTORY
  1.0 - Initial creation with embedded list of model colors
        Based an earlier macro I created, ModelColors V2.5

-------------------------------------------------------------------------------

DISCLAIMER:
* These macros are provided free of charge for personal use and/or reference. 
* These macros may be freely distributed, provided the original copyright 
  notices remain unchanged and intact. 
* All macros were written to work with SolidWorks 2003. 
* These macros, and corresponding files, are provided as is. 
* There are no warranties, expressed or implied, that these macros will perform 
  as indicated, perform to users expectations, or complete a specific task. 
* These macros will change the current SolidWorks document. Use these macros at 
  your own risk. Back up your data before using this macro on any SolidWorks 
  document. 

-------------------------------------------------------------------------------

CONFIGURING THE EXTERNAL DATA FILE:
  * Data file must be in same directory as macro file.  
  * Data file must have same name as macro file with '.ini' extension.
  * Section names must be enclose with [] brackets. 
  * Section names are case sensitive and must match.  
  * An empty line must exist at the end of each section.
  * Data with special characters should be enclosed in "" quotes.
  * Option group has 2 options that must be set to 'True' to activate.
  * Option 'ControlResolution' defined the available increments for the
    specularity and transparency controls.  If this option is not in the 
    data file, this will default to 20.
  * The color groups names must be bracketed [] and must exist in data file.
  * This group must contain the following:  (see example below)
      1) Color name (used in color button tool tip)
      2) Model color in hexadecimal format.
  * Hex color values must be preceeded by the '&H' standard nomenclature
  * Hex color values must follow the standard RGB format (&HBBGGRR)

Example:
  Color, ColorName

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 

[OPTIONS]
ApplyToShaded=True
ApplyToWireframe=False
ControlResolution=32

[COLORS]
&He6e8fa, Silver
&HF0B050, Light Bronze
&HF0B090, Light Copper
&Hcfb53b, Gold
&H8f8fbd, Steel Blue
&H527f76, Oxidized Copper 

[SHADES]
&HFF0000, Blue
&HFFFF00, Cyan
&H00FF00, Green
&H00FFFF, Yellow
&H0000FF, Red
&HFF00FF, Purple

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 
