[Back to Blog](/blog) # BimRv SDK: Work with the FamilyGeomCombination Interface

Artur Vakhramov May 07, 2021 [\#rvt](/blog/tag/rvt) [\#rfa](/blog/tag/rfa) [\#getting started](/blog/tag/getting-started)

<a class="a2a_button_facebook"></a><a class="a2a_button_twitter"></a><a class="a2a_button_linkedin"></a>

This article describes how to add and remove elements from a geometric combination.

A FamilyGeomCombination element implements geometric combinations and contains a set of GenSweep-derivative elements (e.g., extrusion, sweep, blend).

#### Add Elements to a Combination

To add a solid form to a combination, use the appropriate addSolidGeomToCombination() method:

```
OdResult addSolidGeomToCombination(const OdBmObjectId& id);
```

Here, id is an identifier of a solid GenSweep element.

To add a void form to a combination, use the addVoidGeomToCombination() method:

```
OdResult addVoidGeomToCombination(const OdBmObjectId& id, const OdBmObjectId& solidId);
```

Here, id is an identifier of a void GenSweep element, and solidId is an identifier of an existing solid GenSweep element in a combination.

#### Remove Elements from a Combination

To remove a solid form from a combination, use the appropriate removeSolidGeomFromCombination() method:

```
OdResult removeSolidGeomFromCombination(const OdBmObjectId& id);
```

Here, id is an identifier of a solid GenSweep element.

To remove a void form from a combination, use the removeVoidGeomFromCombination() method:

```
OdResult removeVoidGeomFromCombination(const OdBmObjectId& id, const OdBmObjectId& solidId);
```

Here, id is an identifier of a void GenSweep element, and solidId is an identifier of an existing solid GenSweep element in a combination.

Example The following example can be found in the \_BmFormsJoin\_func() function, located in the Examples/TB\_Commands/BmFamilyBooleanCmd.cpp file.

```
OdBmFamilyGeomCombinationPtr pFamilyGeomCombination = OdBmFamilyGeomCombination::createObject();
ODBM_TRANSACTION_BEGIN(t, pDb)
t.start();
OdBmObjectId idFGC = pDb->addElement(pFamilyGeomCombination);
pFamilyGeomCombination->addSolidGeomToCombination(genSweep1);
pFamilyGeomCombination->addSolidGeomToCombination(genSweep2);
t.commit();
ODBM_TRANSACTION_END()
```

## Get started today

**Try ODA software free for 60 days.  
No risk, no credit card required.**

[Try for Free](https://www.opendesign.com/free-trial)
