# How to highlight imported mesh

**URL:** <https://forum.babylonjs.com/t/how-to-highlight-imported-mesh/7850>\
**Category:** Questions\
**Created:** [January 4, 2020, 4:01am UTC](https://forum.babylonjs.com/t/how-to-highlight-imported-mesh/7850 "2020-01-04T04:01:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TooCalm](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/toocalm/32/3301_2.png) [@TooCalm](https://forum.babylonjs.com/u/TooCalm)\
**Post date:** [January 4, 2020, 4:01am UTC](https://forum.babylonjs.com/t/how-to-highlight-imported-mesh/7850/1 "2020-01-04T04:01:54Z")

</div>

Hi Guys,  
Is there any way to highlight Imported mesh?  
Imported meshes by ImportMesh method have AbstractMesh type but HighlightLayer’s methods needs Mesh type.  
is there any way to convert types or something else? Maybe i’m missing something?

Right now i’m getting an error when trying to call highlightLayer.addMesh with AbstractMesh type  
TS2345: Argument of type ‘AbstractMesh’ is not assignable to parameter of type ‘Mesh’.  
Type ‘AbstractMesh’ is missing the following properties from type ‘Mesh’: \_internalMeshDataInfo, onBeforeRenderObservable, onBeforeBindObservable, onAfterRenderObservable, and 84 more.  
Thank you

---

<div class="post-metadata">

**Author:** ![TooCalm](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/toocalm/32/3301_2.png) [@TooCalm](https://forum.babylonjs.com/u/TooCalm)\
**Post date:** [January 5, 2020, 6:51am UTC](https://forum.babylonjs.com/t/how-to-highlight-imported-mesh/7850/2 "2020-01-05T06:51:15Z")

</div>

Found solution  
to get Mesh type from imported mesh you need to call next snippet  
someVariableWhichContainsImportedMeshOfTypeAbstractMesh.subMeshes[0].getRenderingMesh()

final code is next  
var hl = new BABYLON.HighlightLayer(“hl1”, scene);  
hl.addMesh(someVariableWhichContainsImportedMeshOfTypeAbstractMesh.subMeshes[0].getRenderingMesh(), BABYLON.Color3.Green());
