Properties

AutoDelete

#Since v8.0
public bool AutoDelete { get; }
True if the content is automatically deleted when not in use.

Children

#Since v8.0
public IEnumerable<File3dmRenderContent> Children { get; }

ChildSlotName

#Since v8.0
public string ChildSlotName { get; }
The render content's child slot name.

ComponentStatus

public virtual ComponentStatus ComponentStatus { get; set; }
Gets or sets the component status of the model component.
inherited fromModelComponent

ComponentType

#Since v8.0
public override ModelComponentType ComponentType { get; }

DeletedName

public string DeletedName { get; }
Gets the name of a component that is deleted.
inherited fromModelComponent

Disposed

public bool Disposed { get; }
Indicates if this object has been disposed or the document it originally belonged to has been disposed.
inherited fromCommonObject

File3dmParent

#Since v8.0
public File3dm File3dmParent { get; }
The parent File3dm of the entire hierarchy.

GroupId

#Since v8.0
public Guid GroupId { get; }
The content's group id.

HasId

public bool HasId { get; }
Returns a value indicating whether the component has an ID.
inherited fromModelComponent

HasIndex

public bool HasIndex { get; }
Returns a value indicating whether the component has an Index.
inherited fromModelComponent

HasName

public bool HasName { get; }
Returns a value indicating whether the component has a Name.
inherited fromModelComponent

HasUserData

public bool HasUserData { get; }
Gets true if this class has any custom information attached to it through UserData.
inherited fromCommonObject

Hidden

#Since v8.0
public bool Hidden { get; }
True if the content is hidden.

Id

public virtual Guid Id { get; set; }
Gets or sets the ID of the current instance.
inherited fromModelComponent
InvalidOperationExceptionWhen setting the ID failed. This usually happened because the instance ID is already locked.

IdIsLocked

public bool IdIsLocked { get; }
Returns a value indicating whether the component ID is already locked.
inherited fromModelComponent

Index

public virtual int Index { get; set; }
Gets or sets the model component index attribute.
inherited fromModelComponent
InvalidOperationExceptionWhen setting the Index failed. This usually happens because the instance Index is already locked.

IndexIsLocked

public bool IndexIsLocked { get; }
Returns a value indicating whether the component Index is already locked.
inherited fromModelComponent

InstanceDefinitionModelSerialNumber

[CLSCompliant(false)] public virtual uint InstanceDefinitionModelSerialNumber { get; }
When a component is in a model as part of the information required for a linked instance definition, this value identifies the linked instance definition reference model.
inherited fromModelComponent
Remarks: Reference components are not saved in .3dm archives. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.

IsChild

#Since v8.0
public bool IsChild { get; }
True if this is a child of another render content (i.e., has a parent; is not top-level).

IsComponentStatusLocked

public bool IsComponentStatusLocked { get; }
The component status itself can be locked. This returns an indication.
inherited fromModelComponent

IsDeleted

public virtual bool IsDeleted { get; }
true if the component is deleted. Deleted components are kept by the document for undo purposes.
inherited fromModelComponent

IsDocumentControlled

public virtual bool IsDocumentControlled { get; }
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
inherited fromCommonObject

IsReference

public virtual bool IsReference { get; }
Gets a value indicting whether this component is a referenced component. Referenced components are part of referenced documents.
inherited fromModelComponent

IsSystemComponent

public bool IsSystemComponent { get; }
True if this model component is a system constant.

An incomplete list of system constant model components is below:

  • ON_ModelComponent::Unset

  • ON_InstanceDefinition::Empty

  • ON_Linetype::Unset
  • ON_Linetype::Continuous
  • ON_Linetype::ByLayer
  • ON_Linetype::ByParent

  • ON_Layer::Unset
  • ON_Layer::Default

  • ON_TextStyle::Unset
  • ON_TextStyle::Default
  • ON_TextStyle::ByLayer
  • ON_TextStyle::ByParent

  • ON_DimStyle::Unset
  • ON_DimStyle::Default
  • ON_DimStyle::DefaultInchDecimal
  • ON_DimStyle::DefaultInchFractional
  • ON_DimStyle::DefaultFootInchArchitecture
  • ON_DimStyle::DefaultMillimeterSmall
  • ON_DimStyle::DefaultMillimeterLarge
  • ON_DimStyle::DefaultMillimeterArchitecture
inherited fromModelComponent

IsTopLevel

#Since v8.0
public bool IsTopLevel { get; }
True if this is a top-level render content (i.e., has no parent; is not a child).

IsValid

public virtual bool IsValid { get; }
Tests an object to see if it is valid.
inherited fromCommonObject

Kind

#Since v8.0
public string Kind { get; }
the kind of render content as a string.

ModelSerialNumber

[CLSCompliant(false)] public virtual uint ModelSerialNumber { get; }
A value identifying the model that manages this component.
inherited fromModelComponent
Remarks: If the component is being managed by a model, this value identifies the model. In Rhino, this value is the document runtime serial number. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.

Name

public virtual string Name { get; set; }
Gets or sets the name
inherited fromModelComponent
InvalidOperationExceptionWhen setting the Name failed. This usually happens because the instance Name is already locked.

NameIsLocked

public bool NameIsLocked { get; }
Returns a value indicating whether the component Name is already locked.
inherited fromModelComponent

Notes

#Since v8.0
public string Notes { get; }
The content's notes.

Parent

#Since v8.0
public File3dmRenderContent Parent { get; }
The parent content or null if this is the top level object.

PlugInId

#Since v8.0
public Guid PlugInId { get; }
The content's plug-in id.

Reference

#Since v8.0
public bool Reference { get; }
True if the content is a reference content.

ReferenceModelSerialNumber

[CLSCompliant(false)] public virtual uint ReferenceModelSerialNumber { get; }
When a component is in a model for reference, this value identifies the reference model.
inherited fromModelComponent
Remarks: Reference components are not saved in .3dm archives. Typically this value is set and locked by the code that adds a component to a model. This value is not saved in .3dm archives.

RenderEngineId

#Since v8.0
public Guid RenderEngineId { get; }
The content's render-engine id.

Tags

#Since v8.0
public string Tags { get; }
The content's tags.

TopLevel

#Since v8.0
public File3dmRenderContent TopLevel { get; }
The top-level parent content. Returns this if this is the top-level item.

TypeId

#Since v8.0
public Guid TypeId { get; }
The unique id of the content type.

TypeName

#Since v8.0
public string TypeName { get; }
The internal name of the content type.

UserData

public UserDataList UserData { get; }
List of custom information that is attached to this class.
inherited fromCommonObject

UserDictionary

public ArchivableDictionary UserDictionary { get; }
Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use shareable set of information.
inherited fromCommonObject

Methods

ChildSlotOn

#Since v8.0
public bool ChildSlotOn(string child_slot_name)
True if a particular child slot is 'on'.
child_slot_name (string)

ClearId

public void ClearId()
Resets the HasId property of the model component to false, if possible.
inherited fromModelComponent
InvalidOperationExceptionIf the ID is locked.

ClearIndex

public void ClearIndex()
Resets the HasIndex property of the model component to false, if possible.
inherited fromModelComponent
InvalidOperationExceptionIf the index is locked.

ClearName

public void ClearName()
Resets the HasName property of the model component to false, if possible.
inherited fromModelComponent
InvalidOperationExceptionIf the name is locked.

ConstructConstObject

protected void ConstructConstObject(object parentObject, int subobjectIndex)
Assigns a parent object and a sub-object index to this.
inherited fromCommonObject
parentObject (object)The parent object.
subobjectIndex (int)The sub-object index.

DataCRC

[CLSCompliant(false)] public uint DataCRC(uint currentRemainder)
Increments the Cyclic Redundancy Check value by this instance.
inherited fromModelComponent
currentRemainder (uint)The current remainder value.
The updated remainder value.

DeleteChild

#Since v8.0
public bool DeleteChild(string child_slot_name)
Deletes any existing child with the specified child slot name. True if successful, else false.
child_slot_name (string)

Dispose

public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
inherited fromCommonObject

Dispose

protected virtual void Dispose(bool disposing)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

inherited fromCommonObject
disposing (bool)true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.

EnsurePrivateCopy

public void EnsurePrivateCopy()
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
inherited fromCommonObject

FindChild

#Since v8.0
public File3dmRenderContent FindChild(string child_slot_name)
The child with the specified child slot name, or null if no such child exists.
child_slot_name (string)

GetObjectData

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
inherited fromCommonObject
info (SerializationInfo)The System.Runtime.Serialization.SerializationInfo to populate with data.
context (StreamingContext)The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

GetParameter

#Since v8.0
[CLSCompliant(false)] public IConvertible GetParameter(string param)
Gets a named parameter. The parameter value or null if not found.
param (string)

IsValidWithLog

public bool IsValidWithLog(out string log)
Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
inherited fromCommonObject
log (out string)A textual log. This out parameter is assigned during this call.
true if this object is valid; false otherwise.

LockId

public void LockId()
Locks the component Id property.
inherited fromModelComponent

LockIndex

public void LockIndex()
Locks the component Index property.
inherited fromModelComponent

LockName

public void LockName()
Locks the component Name property.
inherited fromModelComponent

NonConstOperation

protected virtual void NonConstOperation()
For derived classes implementers.

Defines the necessary implementation to free the instance from being constant.

inherited fromCommonObject

OnSwitchToNonConst

protected virtual void OnSwitchToNonConst()
Is called when a non-constant operation first occurs.
inherited fromCommonObject

SetParameter

#Since v8.0
public bool SetParameter(string param, object value)
Sets a named parameter. True if the parameter was set, else false.
param (string)
value (object)

ToJSON

public string ToJSON(SerializationOptions options)
Create a JSON string representation of this object
inherited fromCommonObject
options (SerializationOptions)

ToString

public override string ToString()
Returns the name of the model component type, and then its name and index.
inherited fromModelComponent
Remarks: This is provided as a visual aid. Do not rely on this for serialization.
Object.ToString

XML

#Since v8.0
public string XML(bool recursive)
Gets the render content's state as an XML string.
recursive (bool)