# Get width/height from lines

**URL:** <https://forums.creativeclouddeveloper.com/t/get-width-height-from-lines/1825>\
**Category:** UXP Plugin API\
**Tags:** javascript\
**Created:** [June 7, 2020, 3:30pm UTC](https://forums.creativeclouddeveloper.com/t/get-width-height-from-lines/1825 "2020-06-07T15:30:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jojo](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jojo](https://forums.creativeclouddeveloper.com/u/Jojo)\
**Post date:** [June 7, 2020, 3:30pm UTC](https://forums.creativeclouddeveloper.com/t/get-width-height-from-lines/1825/1 "2020-06-07T15:30:58Z")

</div>

Hey everyone,

again I don’t know how to get a certain value out of a selected item.  
For example I have this item:

```
Line ('Line1') {
    width: 1270, height: 2
    global X,Y: 2475.5, 165.5
    parent: Artboard ('Web 1920 – 2')
    stroke: ff707070

```

I need the width (and height), but with **item.width** I get nothing out of it.  
(For Recangle this works…)

Hope you can help me - Thanks! =)  
Jojo

---

<div class="post-metadata">

**Author:** ![pklaschka](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pklaschka/32/3162_2.png) [@pklaschka](https://forums.creativeclouddeveloper.com/u/pklaschka)\
**Post date:** [June 7, 2020, 8:44pm UTC](https://forums.creativeclouddeveloper.com/t/get-width-height-from-lines/1825/3 "2020-06-07T20:44:20Z")

</div>

`width` and `height` are part of the “bounds” properties (`localBounds`, `boundsInParent`, etc.).

Therefore, depending on which of those you need, you’ll be able to access it with either

```auto
node.localBounds.width
node.localBounds.height
node.boundsInParent.width
[...]

```

cf. [https://adobexdplatform.com/plugin-docs/reference/scenegraph.html#scenenode](https://adobexdplatform.com/plugin-docs/reference/scenegraph.html#scenenode)
