# Selection groups not working from inserted geometries

**URL:** <https://molflow-forum.web.cern.ch/t/selection-groups-not-working-from-inserted-geometries/594>\
**Category:** Bugs & Issues\
**Created:** [January 9, 2024, 5:12pm UTC](https://molflow-forum.web.cern.ch/t/selection-groups-not-working-from-inserted-geometries/594 "2024-01-09T17:12:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alan](https://molflow-forum.web.cern.ch/user_avatar/molflow-forum.web.cern.ch/alan/32/730_2.png) [@alan](https://molflow-forum.web.cern.ch/u/alan)\
**Post date:** [January 9, 2024, 5:12pm UTC](https://molflow-forum.web.cern.ch/t/selection-groups-not-working-from-inserted-geometries/594/1 "2024-01-09T17:12:58Z")

</div>

It is easier to build a complex geometry in parts and assembling them together by inserting the geometry into a master assembly. It also makes selecting groups easier as there are not as many facets to work around. When you insert a geometry with selection groups in them you will see them listed in the master assembly but when you try to use them you will get an error like this…

![Screenshot 2024-01-08 at 6.15.35 PM](https://molflow-forum.web.cern.ch/uploads/default/original/1X/9eb6bdfc9458d521d0fc52d6c840b8dd6045ad44.png)

Other times…I think…I’ve seen it select the wrong facets as if the facet list is wrong. I’m using MAC ARM 2.9.18 beta but I’ve seen this in many previous versions.

-Alan

---

<div class="post-metadata">

**Author:** ![maarton](https://molflow-forum.web.cern.ch/letter_avatar_proxy/v4/letter/m/e5b9ba/32.png) [@maarton](https://molflow-forum.web.cern.ch/u/maarton)\
**Post date:** [January 12, 2024, 11:15am UTC](https://molflow-forum.web.cern.ch/t/selection-groups-not-working-from-inserted-geometries/594/2 "2024-01-12T11:15:04Z")

</div>

Many thanks Alan for reporting this.

Formulas and selections should be renumbered upon insertion by offsetting facet numbers with the **existing** number of facets.

I wrote new code this august to unify inserting and loading models (to avoid duplicate code doing almost the same thing), and I made a mistake to offset formulas **after** the geometry is inserted - facet numbers were offset with the **new** number of facets. This bug was present since 2.9.15.

You can download a temporary, fixed version here (use build-artifacts column):

> **[Pipeline · molflow\_synrad / molflow · GitLab](https://gitlab.cern.ch/molflow_synrad/molflow/-/pipelines/6722564)**
>
> Source files specific to Molflow+

And the fix will be released in 2.9.19 beta.

Cheers, Marton
