Skip to main content
12-Amethyst
June 18, 2020
Question

Creo customization including VBAPI,Weblink,Jlink

  • June 18, 2020
  • 1 reply
  • 2809 views

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

1 reply

MurphyMin12-AmethystAuthor
12-Amethyst
June 18, 2020

 weblink configuration.JPG

 

 

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

 

MurphyMin12-AmethystAuthor
12-Amethyst
June 18, 2020

Get model info in session

 

modelInfo.JPG