# addPolyline Leader line creating with outer uncertain thickness

**URL:** <https://forum.techsoft3d.com/t/addpolyline-leader-line-creating-with-outer-uncertain-thickness/3725>\
**Category:** HOOPS Visualize Web\
**Tags:** webviewer\
**Created:** [May 29, 2024, 8:09am UTC](https://forum.techsoft3d.com/t/addpolyline-leader-line-creating-with-outer-uncertain-thickness/3725 "2024-05-29T08:09:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![swaminarayan.sharma](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@swaminarayan.sharma](https://forum.techsoft3d.com/u/swaminarayan.sharma)\
**Post date:** [May 29, 2024, 8:09am UTC](https://forum.techsoft3d.com/t/addpolyline-leader-line-creating-with-outer-uncertain-thickness/3725/1 "2024-05-29T08:09:23Z")

</div>

Hello @tino,

I have resolved the above issue. by changing the creation flag

But I am facing the issue related to addPolyline, createMeshInstance function

```auto
const leaderLineVertices = [0, 0, 0, 1, 1, 1]
const leaderMeshData = new Communicator.MeshData()
leaderMeshData.addPolyline(leaderLineVertices, undefined);
const leaderMeshId = await this._viewer.model.createMesh(leaderMeshData)

const leaderMeshInstanceData = new Communicator.MeshInstanceData(
    leaderMeshId, 
)
leaderMeshInstanceData.setCreationFlags(
    Communicator.MeshInstanceCreationFlags.OverrideSceneVisibility
)
leaderMeshInstanceData.setLineColor(Communicator.Color.black())
const leaderInstanceId = await this._viewer.model.createMeshInstance(
    leaderMeshInstanceData
)

```

**But we are getting below unexpected behavior, as per our code color of polyline should be BLACK, but its getting red at some places as its default behavior**

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/8/8cb32ee6718a79da0567331da37fd1a7ae515300.jpeg)

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [May 29, 2024, 5:59pm UTC](https://forum.techsoft3d.com/t/addpolyline-leader-line-creating-with-outer-uncertain-thickness/3725/2 "2024-05-29T17:59:59Z")

</div>

Hello @swaminarayan.sharma,

When running your code snippet, I’m not able to reproduce different colors on the polyline:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/e/e15929547d48af6dad67f9eabe7a914c4b21f7dd.jpeg)

Can you try loading a different model? Also, I noticed that the polyline thickness is larger than I would expect. Do you have such code that affects the line thickness?

Thanks,  
Tino
