Hello, this is my first time posting a question. Hopefully i do not violate any forum rules

I am trying to achieve this, as picture shows.

Let’s say that I am inside a group when I want to operate this.

Calculating distance of a point / vertices of an edge to current active group.

What i am doing is the **A distance** as picture shows.

Here is my current code

```
sketch = Sketchup.active_model
selection = sketch.selection
pointToCalculate = selection[0].start
resultX = pointToCalculate.position.x
#or in short
resultX = Sketchup.active_model.selection[0].start.position.x
#what i am trying to achieve
goalX = resultX - currentOriginRelativeToAxes
#currentOriginRelativeToAxes = ??
```

To get the calculation to perform in relative axes / relative origin.

I’ve been looking at the API but found no clue how to get the calculation.

```
#this also doesn't help
goalX = Sketchup.active_model.axes.origin - resultX
#giving C distance
```

Is there anyway to calculate the distance relative to group axes?

The goal is to get **B distance**

Thank you.