# Adding Dimension lines with an offset

**URL:** <https://femdesign.discourse.group/t/adding-dimension-lines-with-an-offset/359>\
**Category:** C#\
**Tags:** waiting\
**Created:** [1 October 2024 06:28 UTC](https://femdesign.discourse.group/t/adding-dimension-lines-with-an-offset/359 "2024-10-01T06:28:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kristiandl](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kristiandl](https://femdesign.discourse.group/u/Kristiandl)\
**Post date:** [1 October 2024 06:28 UTC](https://femdesign.discourse.group/t/adding-dimension-lines-with-an-offset/359/1 "2024-10-01T06:28:22Z")

</div>

Hi!

I’m trying to add dimension lines a plate model using the API.  
I want the dimensin line to be placed next to my model and not directly on top of.

My code looks like this:

```auto
var dim = new DimensionLinear(new List<Point3d> { points[7], points[0] }, Plane.XY);
model.AddLinearDimension(dim, true);

```

And gives the following result:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/femdesign_api/original/1X/596deaf26917a1496a2c7bcdd05f69b242989448.png)

Can i somehow translate the dimension line placement so it looks like this?

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/femdesign_api/original/1X/1e7b2034197dc6ba86a486bef556cad12a7e3f8d.png)

I haven’t been able to find another function for this in the documentation but i could be wrong?

I guess i could use other reference points in the DimensionLinear function but then they won’t be connected to the plate corner points.

Any idea how to solve this?

Best regards  
Kristian

---

<div class="post-metadata">

**Author:** ![MarcoPelle](https://dub1.discourse-cdn.com/flex017/user_avatar/femdesign.discourse.group/marcopelle/32/6_2.png) [@MarcoPelle](https://femdesign.discourse.group/u/MarcoPelle)\
**Post date:** [2 October 2024 10:38 UTC](https://femdesign.discourse.group/t/adding-dimension-lines-with-an-offset/359/2 "2024-10-02T10:38:18Z")

</div>

Hi @Kristiandl 👋

For the time being, you will need to perform an offset with some code.  
Which settings you would like to see in the annotation constructor?

---

<div class="post-metadata">

**Author:** ![Kristiandl](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kristiandl](https://femdesign.discourse.group/u/Kristiandl)\
**Post date:** [7 October 2024 06:09 UTC](https://femdesign.discourse.group/t/adding-dimension-lines-with-an-offset/359/3 "2024-10-07T06:09:30Z")

</div>

> Blockquote  
> For the time being, you will need to perform an offset with some code.

Does this mean to manipulate the struxml or can i offset it using the API?

> Blockquote  
> Which settings you would like to see in the annotation constructor?

I guess the settings from the “Dimension settings” would be nice to have:

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/femdesign_api/original/1X/a76b22e7bfbf4c6300d649918af01262bda35545.png)  
But the offset (c) is the most important to me at least 🙂

---

<div class="post-metadata">

**Author:** ![MarcoPelle](https://dub1.discourse-cdn.com/flex017/user_avatar/femdesign.discourse.group/marcopelle/32/6_2.png) [@MarcoPelle](https://femdesign.discourse.group/u/MarcoPelle)\
**Post date:** [7 October 2024 07:40 UTC](https://femdesign.discourse.group/t/adding-dimension-lines-with-an-offset/359/4 "2024-10-07T07:40:56Z")

</div>

oki doki!

it makes totally sense to implement the most important settings as specified in the GUI. However, I think that the API is only setting the position and it does not override the default values.

I have opened a ticket for our team. We will get in touch when solved

> <https://github.com/strusoft/femdesign-api/issues/1094>
>
> https://femdesign.discourse.group/t/adding-dimension-lines-with-an-offset/35…9/3?u=marcopelle

> Does this mean to manipulate the struxml or can i offset it using the API?

You can do an “offset” of the input points 🙂

---

<div class="post-metadata">

**Author:** ![Kristiandl](https://avatars.discourse-cdn.com/v4/letter/k/a8b319/32.png) [@Kristiandl](https://femdesign.discourse.group/u/Kristiandl)\
**Post date:** [7 October 2024 07:44 UTC](https://femdesign.discourse.group/t/adding-dimension-lines-with-an-offset/359/5 "2024-10-07T07:44:22Z")

</div>

Allright, thanks for taking the time and looking into this! 🙂

I will offset the points as a temporary solution then. 👍
