AnsweredAssumed Answered

Edrawings has stopped working in html browser

Question asked by Mads Peter Jensen on Sep 9, 2013
Latest reply on Sep 17, 2013 by Mads Peter Jensen

Hi

I am hoping that sombody out there could help me. I am using a edrawings for showing solidworks files. And I have succesfully used the below shown web page in a Internet Explore Control in my application. This has worked fine, but for some reason, it has stopped working now.

The Edrawings installpacket install correct, and I am able to open and show the solidworks file in standard E-drawings.

The script when the page is runned, the script return an error saying: "eDrawing undefined". For me it looks like the browser is not able to start the eDrawings control from the classid. I have search the classid in registry, and it show that its refering to "EModelView.EModelNonVersionSpecificViewControl" which I find correct.

Can anyone tell me what is wrong?

 

<HTML>

<HEAD>

<TITLE>

SolidWorks view.

</TITLE>

</HEAD>

<BODY LANGUAGE=javascript onload="loadDocument()" SCROLL="no" style="margin:0px;padding:0px;background-color:white;font-family:arial; color:black; font-size:70%">

 

<OBJECT id=eDrawing CLASSID="clsid:22945A69-1191-4DCF-9E6F-409BDE94D101" STYLE="height:100%; width: 100%" codebase="http://www.solidworks.com/plugins/edrawings/download.cfm?Release=rel#version=7,0,0,623">

</OBJECT>

 

<SCRIPT type="text/javascript">

 

function loadDocument()

{

 

var sURL=window.document.URL.toString();

var fileName="C:\Users\MPJ\Desktop\belt pulley.SLDPRT";

var arrParams = sURL.split("?");

 

  if (arrParams.length==2)

  {

  var arrKeyValue=arrParams[1].split("=")

  

    if (arrKeyValue.length==2)

    {

    fileName=arrKeyValue[1]

    fileName=fileName.replace(/%C3%A6/g,"æ");

    fileName=fileName.replace(/%C3%B8/g,"ø");

    fileName=fileName.replace(/%C3%A5/g,"å");

    fileName=fileName.replace(/%C3%86/g,"Æ");

    fileName=fileName.replace(/%C3%98/g,"Ø");

    fileName=fileName.replace(/%C3%85/g,"Å");

    fileName=fileName.replace(/%20/g," ");

    fileName=fileName.replace(/%26/g,"&"); 

    }

  }

 

 

  if (fileName.substring(0,1)=='/')

  {

 

    if (fileName.substring (2,1)!='/')

    {

      fileName= '/' + fileName;

    }

  }

 

 

  if (fileName.length>2)

  {

      eDrawing.OpenDoc(fileName, false, false, true, '');

  }

}

</SCRIPT>

</BODY>

</HTML>

Outcomes