Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Web Link

msiva1981

Member
I have been using Pro E for two years now. I would like to know about Weblink as iam not quite sure what this does. Could anyone let me know about some tutorials or a goosd stating point for me to learn it. I could not find much on posts here


Siva
 
I have a discussion on how to setup a simple WebLink application on my blog:


[url]http://inversionconsulting.blogspot.com/2008/04/weblink-hell o-world.html[/url]


Here is the Hello World example from the blog entry:


<HTML>
<SCRIPT LANGUAGE="JavaScript" type=text/javascript src="pfcUtils.js"></SCRIPT>
<BODY>


<SCRIPT LANGUAGE="JavaScript">


function HitMe() {


if (!pfcIsWindows())
netscape.security.PrivilegeManager.enablePrivilege("Universa lXPConnect");


var form_elem = document.getElementById("mesg");


var modelname = "no model";
var session = null;
var model = null;


try {
session = pfcGetProESession();
}
catch (e) {
form_elem.innerHTML = "ERROR: Cannot connect to Pro/Engineer session!";
return;
}


try {
model = session.CurrentModel;
modelname = model.FileName;
}
catch (e) {
// probably no model
form_elem.innerHTML = "Make sure a model is active!";
return;
}


form_elem.innerHTML = "Hello! My name is: " + modelname;


}


</SCRIPT>


<form name="f">
<INPUT name="btn1" type=button value="Hit me!" onclick="HitMe()">
<br><a id="mesg"></a>
</form>
</BODY>
</HTML>



If you have any questions, feel free to send me an email, post a reply here, or at my blog. Good luck!
 

Sponsor

Back
Top