Class Group
Represents a group of entities.
Implements
Inherited Members
Namespace: netDxf.Objects
Assembly: CADability.dll
Syntax
public class Group : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>
Constructors
| Improve this Doc View SourceGroup()
Initialized a new unnamed empty group.
Declaration
public Group()
Remarks
A unique name will be generated when the group is added to the document.
Group(IEnumerable<EntityObject>)
Initialized a new group with the specified entities.
Declaration
public Group(IEnumerable<EntityObject> entities)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<EntityObject> | entities | The list of entities contained in the group. |
Remarks
A unique name will be generated when the group is added to the document.
Group(String)
Initialized a new empty group.
Declaration
public Group(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Group name. |
Remarks
If the name is set to null or empty, a unique name will be generated when the group is added to the document.
Group(String, IEnumerable<EntityObject>)
Initialized a new group with the specified entities.
Declaration
public Group(string name, IEnumerable<EntityObject> entities)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Group name (optional). |
| System.Collections.Generic.IEnumerable<EntityObject> | entities | The list of entities contained in the group. |
Remarks
If the name is set to null or empty, a unique name will be generated when the group is added to the document.
Properties
| Improve this Doc View SourceDescription
Gets or sets the description of the group.
Declaration
public string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Entities
Gets the list of entities contained in the group.
Declaration
public EntityCollection Entities { get; }
Property Value
| Type | Description |
|---|---|
| EntityCollection |
Remarks
When the group is added to the document the entities in it will be automatically added too.
An entity may be contained in different groups.
IsSelectable
Gets or sets if the group is selectable.
Declaration
public bool IsSelectable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsUnnamed
Gets if the group has an automatic generated name.
Declaration
public bool IsUnnamed { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Name
Gets the name of the table object.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
Table object names are case insensitive.
Owner
Gets the owner of the actual DXF object.
Declaration
public Groups Owner { get; }
Property Value
| Type | Description |
|---|---|
| Groups |
Methods
| Improve this Doc View SourceClone()
Creates a new Group that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Group that is a copy of this instance. |
Overrides
| Improve this Doc View SourceClone(String)
Creates a new Group that is a copy of the current instance.
Declaration
public override TableObject Clone(string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | newName | Group name of the copy. |
Returns
| Type | Description |
|---|---|
| TableObject | A new Group that is a copy of this instance. |
Overrides
Remarks
The entities that belong to the group will also be cloned.
OnEntityAddedEvent(EntityObject)
Declaration
protected virtual void OnEntityAddedEvent(EntityObject item)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityObject | item |
OnEntityRemovedEvent(EntityObject)
Declaration
protected virtual void OnEntityRemovedEvent(EntityObject item)
Parameters
| Type | Name | Description |
|---|---|---|
| EntityObject | item |
Events
| Improve this Doc View SourceEntityAdded
Declaration
public event Group.EntityAddedEventHandler EntityAdded
Event Type
| Type | Description |
|---|---|
| Group.EntityAddedEventHandler |
EntityRemoved
Declaration
public event Group.EntityRemovedEventHandler EntityRemoved
Event Type
| Type | Description |
|---|---|
| Group.EntityRemovedEventHandler |