# DimensionEntity

## Functions

| `DimensionEntity`
| `DimensionEntity`
| `~DimensionEntity`
void | `Set`
DimensionEntity const & | `operator=`
`Type` | `GetType`
Dimension::Type | `GetDimensionType`
void | `SetDimensionType`
Dimension::SubType | `GetDimensionSubType`
void | `SetDimensionSubType`
unsigned int | `GetStringCount`
void | `GetStrings`
void | `SetStrings`

## Detailed Description

class DimensionEntity : public PMI::Entity

  This class represents basic, reference or tolerance dimension.

  Public Functions

  DimensionEntity(HC_KEY segment_key = (-1L))

    Constructs a DimensionEntity object. It requires specifying the segment key where the DimensionEntity will insert associated geometry.

  DimensionEntity(DimensionEntity const &that)
  virtual ~DimensionEntity()
  void Set(DimensionEntity const &that)
  DimensionEntity const &operator=(DimensionEntity const &that)
  inline virtual Type GetType() const
    Returns

      the PMI::Type for this entity. Overridden by subclasses.

  Dimension::Type GetDimensionType() const
    Returns

      the dimension type of this DimensionEntity

  void SetDimensionType(Dimension::Type const in_type)

    Sets the dimension type of this DimensionEntity. This will replace an existing dimension type.

  Dimension::SubType GetDimensionSubType() const
    Returns

      the dimension subtype of this DimensionEntity

  void SetDimensionSubType(Dimension::SubType const in_sub_type)

    Sets the dimension subtype of this DimensionEntity. This will replace an existing dimension subtype.

  unsigned int GetStringCount() const
    Returns

      the number of strings for this DimensionEntity

  void GetStrings(unsigned int &out_count, String out_strings[], TextAttributes out_text_attributes[]) const

    Gets the strings for this DimensionEntity.

    Parameters

      - out_count – the number of strings for this DimensionEntity. Returned to the user.

      - out_strings – the array of strings for this DimensionEntity. Returned to the user. Necessary space should be allocated prior to calling. If pointer is NULL no values will be put into the array.

      - out_text_attributes – the array of TextAttributes for the strings for this DimensionEntity. Returned to the user. Necessary space should be allocated prior to calling. If pointer is NULL no values will be put into the array.

  void SetStrings(unsigned int in_count, String const in_strings[], TextAttributes const in_text_attributes[])

    Sets the strings for this DimensionEntity. These will replace any existing strings.

    Parameters

      - in_count – the number of strings in the array

      - in_strings – the array of strings for this DimensionEntity

      - in_text_attributes – the array of TextAttributes for the strings for this DimensionEntity