# cee::vtfx::SetBlock

class `SetBlock` : public Block

  A block for storing sets of elements, nodes, element faces, element edges, element nodes.

  Public Types

  enum `ItemType`

    Item types for SetBlock.

    Values:

    enumerator `ELEMENT`

      Element set.

    enumerator `ELEMENT_FACE`

      Element face set.

    enumerator `ELEMENT_EDGE`

      Element edge set.

    enumerator `ELEMENT_NODE`

      Element node set.

    enumerator `NODE`

      Node set.

    enumerator `UNKNOWN_ITEM_TYPE`

      Unknown item type.

  Public Functions

  `SetBlock`(int blockId, bool itemsReferencedByIds)

    Constructs an empty set block.

    blockId must be >= 0 and unique for all set blocks within a database. itemsReferencedByIds specifies if set items will be supplied by their ids or not.

  virtual `~SetBlock`()
  int `setId`() const

    Returns the set id.

  void `setSetId`(int setId)

    Sets the set id.

  Str `setName`() const

    Returns the name of the set.

  void `setSetName`(const Str &name)

    Sets the name to name.

  ItemType `itemType`() const

    Returns the item type of this set.

  void `setItemType`(ItemType itemType)

    Sets the item type.

  size_t `totalItemCount`() const

    Returns the total number of items found in all groups in this set.

  bool `itemsReferencedById`() const

    Returns true if the items (elements or nodes) are referenced by id, false if by index.

    Note: Sub items are always referenced by zero based index

  int `itemGroupCount`() const

    Returns the number of groups in this set.

  SetItemGroup *`itemGroup`(size_t index)

    Returns the groups at index.

  const SetItemGroup *`itemGroup`(size_t index) const

    Returns the groups at index.

  bool `addItemGroup`(SetItemGroup *itemGroup)

    Adds an item group to this set.

  void `addItem`(int itemIdOrIndex, int itemGroupId)

    Adds an item.

  void `addItems`(const int *itemIndicesOrIds, size_t itemCount, int itemGroupId)

    Adds items from given array itemIndicesOrIds.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...