Embed eDrawings Viewer 2012 in ASP.NET C# App

Hi all -

I've been trying to figure out how to embed a eDrawings Viewer in an ASP.NET C# Web Application. We use a custom web application (local network) within our factory and I would like the viewer to show an assembly file on pages within the app. Ive looked over several of the sample codes with no luck. Ive also tried searching through the posts and just cant seem to find the answer.

Has anyone done this? Anyone willing to give me a quick how-to? I just need to know what assemblies are needed, the C# code behind and what the ASP.NET/HTML looks like.

I appreciate any help I can get with this. 

Thank you,

Ben

SolidworksApi macros
Answers 6
AT
AT 2013-09-09 Best Answer

I would insert HTML piece to your ASP.NET application generated dynamically:

<p><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"><HTML></span></p><p><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"><BODY></span></p><p><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"><span><OBJECT ID="EV" classid="clsid:22945A69-1191-4DCF-9E6F-409BDE94D101" codebase="</span><a class="jive-link-external-small" href="http://www.solidworks.com/plugins/edrawings/download.cfm?Release=rel#version=" data-community-id="1">http://www.solidworks.com/plugins/edrawings/download.cfm?Release=rel#version=</a><span style="color: red;"><strong>12,4,0,108</strong></span>" width="<span style="color: red;"><strong>100%</strong></span>" height="<span style="color: red;"><strong>100%</strong></span>"></span></p><p><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';">    <PARAM name="FullUI" value="1" /></span></p><p><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';">    <PARAM name="Filename" value="<span style="color: red;"><strong>path_to_your_file_on_server</strong></span>" /></span></p><p><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"></OBJECT></span></p><p><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"></BODY></span></p><p><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"></HTML></span></p>

Replace red values with values on your system.

____________________________________________________

Regards,

Artem Taturevych, Application Engineer at Intercad (Australia)

translationXpert – add-in to translate SolidWorks models

myIntercad – an integrated tool for SolidWorks Professionals

LinkedIn SolidWorks API Education Group

SF
SF 2013-09-09

Thanks for the reply Artem. When I run the program I get a blank page. My path looks like "\\server\folder\folder\file.SLDPRT". I left everything else just as you have it.

Do I need to load the EModelView assembly in my code behind or something?

EDIT: I have been using Chrome. Artems code worked great in IE.

AT
AT 2013-09-09

Yes, sorry haven’t mentioned this. At the moment eDrawings viewer is only supported by Internet Explorer.

____________________________________________________

Regards,

Artem Taturevych, Application Engineer at Intercad (Australia)

translationXpert – add-in to translate SolidWorks models

myIntercad – an integrated tool for SolidWorks Professionals

LinkedIn SolidWorks API Education Group

VZ
VZ 2019-09-24

Hi Artem, 

Is your solution still available in eDrawing 2019? or there is something done to it ?

AT
AT 2019-09-24

I was trying to explore this the other day with no success. I was not able to install the plugin to the browser, it has failed.

VZ
VZ 2019-09-25

well, good to know the conclusion