A visual style represents a collection of settings that are applied to views. These settings determine the method used to render the object in the view, the face and edge styles of those objects, and the display settings for the view. Visual style objects are of type AcDbVisualStyle and are stored in a dictionary named ACAD_VISUALSTYLE, which resides in the named object dictionary.
Visual styles let you quickly and conveniently change the visualization of your 3D model without having to change multiple system variables.
You can use AcDbVisualStyle::setType() to set the type of a visual style. If you set the type to anything other than kCustom, you need to call configureForType() with the new type passed in as an argument, to configure your AcDbVisualStyle object to the properties of that type. The various types are enumerated in AcGiVisualStyle::Type. Refer to the ObjectARX Reference Guide for a description of the available types.
Edge display is controlled by the AcGiVisualStyleProperties::EdgeModel enum, which is set into a visual style through AcGiVisualStyle::setTrait(). An edge can be set to display as a facet edge or isolines. If the edge model is set to isolines, facet edge options, such as obscured edges and intersection edges, are unavailable. Edge modifiers such as overhang, jitter, and halo gap can be applied to the edge. You can also set the properties for fast silhouette edges, obscured edges, and intersection edges.
Face display is controlled by a group of enums, AcGiVisualStyleProperties::FaceLightingModel, AcGiVisualStyleProperties::FaceLightingQuality, AcGiVisualStyleProperties::FaceColorMode, and AcGiVisualStyleProperties::FaceModifiers, which are set into the visual style through AcGiVisualStyle::setTrait(). You can define the lighting model and quality used to shade faces, as well as the material or color mode.
Edge display and face display cannot be set to None at the same time. This will result in no geometry being displayed in the view.
The display style, set through the AcGiVisualStyleProperties::DisplayStyles enum, determines a view’s environment settings. AcGiVisualStyle::setTrait() is used to change the display of backgrounds, lighting, materials, textures, and shadows.
See “Visual Styles Manager” in the AutoCAD Command Reference for a complete description of the visual styles properties and their relation to the associated system variables.