Skip to main content
12-Amethyst
June 18, 2020
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

MurphyMin12-AmethystAuthor
12-Amethyst
June 18, 2020

 weblink configuration.JPG

 

 

Translate
MurphyMin12-AmethystAuthor
12-Amethyst
June 18, 2020
  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

 

Translate
MurphyMin12-AmethystAuthor
12-Amethyst
June 18, 2020

Get model info in session

 

modelInfo.JPG

Translate