Skip to main content
Jun 18, 2020 5:31 AM UTC
Question

Creo customization including VBAPI,Weblink,Jlink

One to four little updates for these topics

 

Contact with me if you're interested in these and send me your mail address

 

contact mail:15913754304@163.com

5 replies

MurphyMinAuthor
Jun 18, 2020 6:07 AM UTC

 weblink configuration.JPG

 

 

MurphyMinAuthor
Jun 18, 2020 6:22 AM UTC
  1. Get creo Session in weblink  MpfcCOMGlobal.GetProESession()

ActiveXObject method to create class in weblink

function pfcCreate (className)
{
  if (pfcIsWindows())
    return new ActiveXObject ("pfc."+className);
  else if (pfcIsChrome())
    return pfcCefCreate (className);
  else if (pfcIsMozilla())
  { 
    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    ret = Components.classes ["@ptc.com/pfc/" + className + ";1"].createInstance();
    return ret;
  }
} 

2.Get current working directory and change it

getCurrentDir.JPGchangeWorkingDir.JPG

 

MurphyMinAuthor
Jun 18, 2020 6:28 AM UTC

Get model info in session

 

modelInfo.JPG