This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - cannot connect eDrawings 2012 viewer

jasonChu - Thursday, May 31, 2012 12:40 AM:

Hi everyone,

I tried to edrawings 2012 as viewer of Aras 9.3 SP2.

I have setting viewer refer to "How to setup eDrawings as client-side viewer" PDF

copy emodeview.dll and create edrawings.html, this files move to ..InnovatorClientscriptsviewers

but when I click solidworks file in Aras, client error message appear.

the "edrawings.html" is as bleow,

 

<!-- (c) Copyright by MEAIS GmbH & Co KG -->
<html>
<head>
<script src="../../javascript/QueryString.js" type="text/javascript"></script>
</head>
<body bgcolor="#ffffff" topmargin="0" marginheight="0" leftmargin="0" marginwidth="0" scroll="no">
<script type="text/javascript">
// Get the URL
var file_url = QueryString("file_url").toString();
// Dateinamen aus der URL extrahieren
var filename = file_url.substr(file_url.search("&fileName=")+10);
filename = decodeURI(filename);
//alert("filename = "+filename);
// Get workdir
var workdir = top.aras.vault.GetWorkingDir();
//alert("workdir = " + workdir);
// Set filename
top.aras.vault.setLocalFileName(filename);
// download file
var res = top.aras.vault.downloadFile(file_url);
if ( !res ) top.aras.AlertError("Failed to download the file.", "item_window: "+top.aras.vault.getLastError(), "Client Side Error");
// Build the complete filename including the path
var fullFileName = workdir + filename;
// Open the 3dvia composer ActiveX-plugin
document.write( '<object' + ' id="EV"' + ' width="100%"' + ' height="100%"' + ' viewastext' + ' classid="CLSID:22945A69-1191-4DCF-9E6F-409BDE94D101"' + ' codebase="'+top.aras.getBaseURL()+'/scripts/viewers/EModelView.dll#Version=7,0,0,623">' + ' <PARAM name="FullUI" value="1"/>' + ' <PARAM Name="Filename" value="' + fullFileName + '">' + '</object>' );
//' codebase="../../customer/3DVIAPlayerActiveX.cab#Version=6,1,2,1341">' +
//' <param name="FileName" value="' + fullFileName + '">' +
</script>

please help me, welcome any Idea!

 



asha_gholve - Thursday, May 31, 2012 1:25 AM:

Hi Kuksun,

for Aras 9.3 use following code instead of above code

 

 

<html>
<head>
<script type="text/javascript" src="../../javascript/AddConfigurationLink.js"></script>
<script src="../../javascript/QueryString.js" type="text/javascript"></script>
</head>
<body bgcolor="#ffffff" topmargin="0" marginheight="0" leftmargin="0" marginwidth="0" scroll="no">
<script type="text/javascript">
// Get the URL
var file_url = QueryString("file_url").toString();
var filename = file_url.substr(file_url.search("&fileName=")+10);
// Remove vaultId from filename if it exists
if(filename.search("&vaultId=")>0){
filename = filename.substring(0,filename.length-41);
}
file_url = top.aras.IomInnovator.getFileUrl(file_url.substr(file_url.search("&fileID=")).substr(8,32), 1);
// Get workdir
var workdir = top.aras.vault.GetWorkingDir();
// Clear the cached data and set the filename
top.aras.vault.clearClientData();
top.aras.vault.clearFileList();
top.aras.vault.setLocalFileName(filename);
// download file
var res = top.aras.vault.downloadFile(file_url);
if ( !res ) top.aras.AlertError("Failed to download the file.", "item_window:"+top.aras.vault.getLastError(),"Client Side Error");
// Build the complete filename including the path
var fullFileName = workdir + filename;
// Open the 3dvia composer ActiveX-plugin
document.write('<object' +' id="EV"' +' width="100%"' +' height="100%"' +' viewastext' +' classid="CLSID:22945A69-1191-4DCF-9E6F-409BDE94D101"' +' codebase="'+top.aras.getBaseURL()+'/scripts/viewers/EModelView.dll">' +' <PARAM name="FullUI" value="1"/>' +' <PARAM Name="Filename" value="' + fullFileName + '">' +'</object>');
</script>
</body>
</html>



jasonChu - Thursday, May 31, 2012 8:11 PM:

Hi Asha,

Thanks to reply, I apllied your code but edrawings not working.

In this time, window is not display anything. only toolbar and menu can see.

 

 

thanks,

kuksun