# ObjectAttributes class

Namespace: [Rhino.DocObjects](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.docobjects.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[Serializable]
public class ObjectAttributes : CommonObject
```

Attributes (color, material, layer,...) associated with a rhino object

## Constructors

- [ObjectAttributes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/ctor.md): (2 overloads)

## Properties

- [CastsShadows](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/castsshadows.md): Gets or sets an object's casts shadows property, or whether or not an object casts shadows on other objects and a ground plane.
- [ClippingPlaneLabelStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/clippingplanelabelstyle.md): Defines how a label for a clipping plane object should be shown
- [ColorSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/colorsource.md): The color used to display an object is specified in one of three ways. If ColorSource is ON::color_from_layer, then the object's layer ON_Layer::Color() is used. If ColorSource is ON::color_from_object, then value of m_color is used. If ColorSource is ON::color_from_material, then the diffuse color of the object's render material is used. See ON_3dmObjectAttributes::MaterialSource() to determine where to get the definition of the object's render material.
- [CustomMeshingParameters](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/custommeshingparameters.md): Returns or sets the per-object render meshing parameters, which controls the object's render mesh density. If this property is null, then the object uses the document's render meshing parameters. To remove the per-object render meshing parameters, set this property to null.
- [Decals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/decals.md): Gets all object decals associated with this object.
- [DetailBackgroundVisible](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/detailbackgroundvisible.md): Should the background color show for a detail
- [DisplayOrder](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/displayorder.md): Display order used to force objects to be drawn on top or behind each other. Larger numbers draw on top of smaller numbers. 0 = draw object in standard depth buffered order <0 = draw object behind "normal" draw order objects >0 = draw object on top of "normal" draw order objects
- [EnableCustomMeshingParameters](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/enablecustommeshingparameters.md): En/disables the custom meshing parameters enabled state.
- [File3dmMeshModifiers](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/file3dmmeshmodifiers.md): Get an object that provides access to mesh modifiers when the attributes is for a File3dmObject.
- [GroupCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/groupcount.md): number of groups object belongs to.
- [HasMapping](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hasmapping.md): A mapping from any plug-in source is associated with these attributes Need to do this here to respond correctly to ModifyObjectAttributes event
- [HatchBackgroundFillColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hatchbackgroundfillcolor.md): Fill color for hatches (default is Color.Empty)
- [HatchBackgroundFillPrintColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hatchbackgroundfillprintcolor.md): Fill color for hatches when printing (default is Color.Empty)
- [HatchBoundaryColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hatchboundarycolor.md): Hatch boundary color override. Default is unset color which means use the standard attributes and layer colors to determine the boundary color
- [HatchBoundaryColorSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hatchboundarycolorsource.md): Source for the hatch boundary display color. Determines whether the boundary color is read from the layer, from the object's main attribute color, inherited from the parent, or read from the custom override color set by HatchBoundaryColor (ColorCustom).
- [HatchBoundaryPlotColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hatchboundaryplotcolor.md): Hatch boundary plot color override. Default is unset color which means use the standard attributes and layer colors to determine the boundary color
- [HatchBoundaryPlotColorSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hatchboundaryplotcolorsource.md): Source for the hatch boundary plot/print color. Determines whether the boundary plot color is read from the layer, from the object's main attribute color, inherited from the parent, or read from the custom override color set by HatchBoundaryPlotColor (ColorCustom).
- [HatchBoundaryPlotWeightMillimeters](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hatchboundaryplotweightmillimeters.md): Plot width of hatch boundary curves. values less than -1 (-10 is default): plot weight is determined by the m_plot_weight -1: do not plot 0: use default weight defined by the print dialog positive values are thicknesses in millimeters to print to
- [HatchBoundaryVisible](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hatchboundaryvisible.md): Draw the bounrdaries for a hatch (default is false)
- [IsDocumentControlled](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/isdocumentcontrolled.md)
- [IsInstanceDefinitionObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/isinstancedefinitionobject.md): Use this query to determine if an object is part of an instance definition.
- [LayerIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/layerindex.md): Gets or sets an associated layer index. Layer definitions in an OpenNURBS model are stored in a layer table. The layer table is conceptually an array of ON_Layer classes. Every OpenNURBS object in a model is on some layer. The object's layer is specified by zero based indices into the ON_Layer array.
- [LinetypeIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/linetypeindex.md): Gets or sets the linetype index. Linetype definitions in an OpenNURBS model are stored in a linetype table. The linetype table is conceptually an array of ON_Linetype classes. Every OpenNURBS object in a model references some linetype. The object's linetype is specified by zero based indices into the ON_Linetype array. Index 0 is reserved for continuous linetype (no pattern).
- [LinetypePatternScale](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/linetypepatternscale.md): Per object linetype scale
- [LinetypeSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/linetypesource.md): The Linetype used to display an object is specified in one of two ways. If LinetypeSource is ON::linetype_from_layer, then the object's layer ON_Layer::Linetype() is used. If LinetypeSource is ON::linetype_from_object, then value of m_linetype is used.
- [MaterialIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/materialindex.md): Gets or sets the material index. If you want something simple and fast, set the index of the rendering material.
- [MaterialRefs](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/materialrefs.md): If you are developing a high quality plug-in renderer, and a user is assigning a custom render material to this object, then add rendering material information to the MaterialRefs dictionary. Note to developers: As soon as the MaterialRefs dictionary contains items rendering material queries slow down. Do not populate the MaterialRefs dictionary when setting the MaterialIndex will take care of your needs.
- [MaterialSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/materialsource.md): Determines if the simple material should come from the object or from it's layer. High quality rendering plug-ins should use m_rendering_attributes.
- [Mode](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/mode.md): An object must be in one of three modes: normal, locked or hidden. If an object is in normal mode, then the object's layer controls visibility and selectability. If an object is locked, then the object's layer controls visibility by the object cannot be selected. If the object is hidden, it is not visible and it cannot be selected.
- [Name](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/name.md): Gets or sets an object optional text name. More than one object in a model can have the same name and some objects may have no name.
- [ObjectColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/objectcolor.md): If ON::color_from_object == ColorSource, then color is the object's display color.
- [ObjectDecoration](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/objectdecoration.md): Used to indicate an object has a decoration (like an arrowhead on a curve)
- [ObjectId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/objectid.md): Every object has a Guid (globally unique identifier, also known as UUID, or universally unique identifier). The default value is Guid.Empty. When an object is added to a model, the value is checked. If the value is Guid.Empty, a new Guid is created. If the value is not null but it is already used by another object in the model, a new Guid is created. If the value is not Guid.Empty and it is not used by another object in the model, then that value persists. When an object is updated, by a move for example, the value of ObjectId persists. This value is the same as the one returned by object.Id.
- [OCSMappingChannelId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/ocsmappingchannelid.md): (static) The mapping channel id to use when calling MappingChannel to retrieve the OCS mapping if there is one.
- [PlotColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/plotcolor.md): If plot_color_from_object == PlotColorSource, then PlotColor is the object's plotting color.
- [PlotColorSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/plotcolorsource.md): The color used to plot an object on paper is specified in one of three ways. If PlotColorSource is ON::plot_color_from_layer, then the object's layer ON_Layer::PlotColor() is used. If PlotColorSource is ON::plot_color_from_object, then value of PlotColor() is used.
- [PlotWeight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/plotweight.md): Plot weight in millimeters. =0.0 means use the default width <0.0 means don't plot (visible for screen display, but does not show on plot)
- [PlotWeightSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/plotweightsource.md)
- [ReceivesShadows](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/receivesshadows.md): Gets or sets an object's receives shadows property, or whether or not an object receives shadows from other objects.
- [RenderMaterial](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/rendermaterial.md): Sets the render material for the object - higher level function for setting MaterialSource and MaterialIndex
- [SectionAttributesSource](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/sectionattributessource.md): Where section attributes are read from
- [SectionStyleIndex](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/sectionstyleindex.md): Gets or sets the section style index.
- [Space](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/space.md): Starting with V4, objects can be in either model space or page space. If an object is in page space, then ViewportId is not nil and identifies the page it is on.
- [Url](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/url.md): Objects may have an URL. There are no restrictions on what value this URL may have. As an example, if the object came from a commercial part library, the URL might point to the definition of that part.
- [UserStringCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/userstringcount.md)
- [ViewportId](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/viewportid.md): If ViewportId is nil, the object is active in all viewports. If ViewportId is not nil, then this object is only active in a specific view. This field is primarily used to assign page space objects to a specific page, but it can also be used to restrict model space to a specific view.
- [Visible](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/visible.md): Gets or sets an object's visibility.
- [WireDensity](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/wiredensity.md): When a surface object is displayed in wireframe, this controls how many isoparametric wires are used. value number of isoparametric wires -1 boundary wires (off) 0 boundary and knot wires 1 boundary and knot wires and, if there are no interior knots, a single interior wire. N>=2 boundary and knot wires and (N+1) interior wires.

## Methods

- [AddActiveInViewportOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/addactiveinviewportoverride.md)
- [AddHideInDetailOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/addhideindetailoverride.md): Make this object hidden in a given detail
- [AddToGroup](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/addtogroup.md): Adds object to the group with specified index by appending index to group list. If the object is already in group, nothing is changed.
- [ClearRenderingAttributes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/clearrenderingattributes.md): Clears, or resets the rendering attributes.
- [ComputedPlotColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/computedplotcolor.md): (2 overloads)
- [ComputedPlotWeight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/computedplotweight.md): (2 overloads)
- [ComputedSectionStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/computedsectionstyle.md)
- [DeleteAllUserStrings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/deletealluserstrings.md)
- [DeleteUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/deleteuserstring.md)
- [DrawColor](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/drawcolor.md): (4 overloads) Gets the draw color of an object in a file, which is based on the object's color source. See [ObjectAttributes.DrawColor(File3dm)](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/drawcolor.md).
- [Duplicate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/duplicate.md): Constructs a copy of this [ObjectAttributes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes.md) instance.
- [GetActiveInViewportOverrides](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/getactiveinviewportoverrides.md)
- [GetCustomLinetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/getcustomlinetype.md): Get an optional custom linetype associated with these attributes. If null, then the attributes use the linetype index to determine it's linetype
- [GetCustomSectionStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/getcustomsectionstyle.md): Get an optional custom section style associated with these attributes.
- [GetDisplayModeOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/getdisplaymodeoverride.md): Returns the id of the display mode of an objects. Object display modes are view based. Thus, it is possible to have an object display different in different views.
- [GetGroupList](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/getgrouplist.md): Returns an array of GroupCount group indices. If GroupCount is zero, then GetGroupList() returns null.
- [GetHideInDetailOverrides](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/gethideindetailoverrides.md): Get list of details that this object is supposed to be hidden in
- [GetUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/getuserstring.md): Gets a user string.
- [GetUserStrings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/getuserstrings.md): Gets an independent copy of the collection of (user text key, user text value) pairs attached to this object.
- [HasActiveInViewportOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hasactiveinviewportoverride.md)
- [HasDisplayModeOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hasdisplaymodeoverride.md): Determines if an object has a display mode override for a given viewport.
- [HasHideInDetailOverrideSet](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/hashideindetailoverrideset.md): Is this object supposed to be hidden in a given detail
- [IsInGroup](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/isingroup.md): Determines if an object belong to a group or not.
- [ObjectFrame](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/objectframe.md)
- [RemoveActiveInViewportOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/removeactiveinviewportoverride.md)
- [RemoveCustomLinetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/removecustomlinetype.md)
- [RemoveCustomSectionStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/removecustomsectionstyle.md)
- [RemoveDisplayModeOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/removedisplaymodeoverride.md): (2 overloads) By default, objects are drawn using the display mode of the viewport that the object is being drawn in. Setting a specific display mode, instructs Rhino to always use that display mode, regardless of the viewport's mode. This function resets an object to use the viewport's display mode for all viewports.
- [RemoveFromAllGroups](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/removefromallgroups.md): Removes object from all groups.
- [RemoveFromGroup](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/removefromgroup.md): removes object from the group with specified index. If the object is not in the group, nothing is changed.
- [RemoveHideInDetailOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/removehideindetailoverride.md): Remove hidden in detail flag for a specific detail
- [SetActiveInViewportOverrides](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/setactiveinviewportoverrides.md)
- [SetCustomLinetype](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/setcustomlinetype.md)
- [SetCustomSectionStyle](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/setcustomsectionstyle.md)
- [SetDisplayModeOverride](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/setdisplaymodeoverride.md): (2 overloads) By default, objects are drawn using the display mode of the viewport that the object is being drawn in. Setting a specific display mode, instructs Rhino to always use that display mode, regardless of the viewport's mode. This version sets a display mode for a specific viewport.
- [SetObjectFrame](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/setobjectframe.md): (2 overloads)
- [SetUserString](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/setuserstring.md): Attach a user string (key,value combination) to this geometry.
- [Transform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes/transform.md): Apply a transformation.

## Inherited Members

- From [CommonObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject.md): [Disposed](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/disposed.md), [HasUserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/hasuserdata.md), [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalid.md), [UserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdata.md), [UserDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdictionary.md), [ConstructConstObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/constructconstobject.md), [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/dispose.md), [EnsurePrivateCopy](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/ensureprivatecopy.md), [GetObjectData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/getobjectdata.md), [IsValidWithLog](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalidwithlog.md), [NonConstOperation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/nonconstoperation.md), [OnSwitchToNonConst](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/onswitchtononconst.md), [ToJSON](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/tojson.md)
