# Cannot preview mesh in c# component

**URL:** <https://discourse.mcneel.com/t/cannot-preview-mesh-in-c-component/138152>\
**Category:** Grasshopper Developer\
**Tags:** mac\
**Created:** [February 18, 2022, 9:43am UTC](https://discourse.mcneel.com/t/cannot-preview-mesh-in-c-component/138152 "2022-02-18T09:43:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrealu2012](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/andrealu2012/32/768496_2.png) [@andrealu2012](https://discourse.mcneel.com/u/andrealu2012)\
**Post date:** [February 18, 2022, 9:43am UTC](https://discourse.mcneel.com/t/cannot-preview-mesh-in-c-component/138152/1 "2022-02-18T09:43:17Z")

</div>

I make a c# component.  
In this component ,I create a mesh, and want to show this mesh.  
I override DrawViewportMeshes,  
but it fail to show mesh in rhino viewport.  
Because this component input and output are all numbers(such as double, int),  
so this component cannot has a "right click-\>preview"switch ,  
so this I suppose, is the reason why this component cannot show mesh.

yes ,if I add a output for “Mesh”,the component can show this mesh in viewport, but my question is:if donnot add a output for “Mesh”,how to show this “preview” switch?  
Thank you! @DavidRutten
