Home Forums Developer forum Load API in Python without path

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #3772
    NextFEM Admin
    Keymaster

    To load NextFEM API in Python by finding the NextFEM installation path in Windows registry you can use:

    def load2():
        aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE)
        aKey = OpenKey(aReg, r"SOFTWARE\Classes\NextFEM Designer\shell\open\command")
        asubkey=OpenKey(aKey,"")
        dirp=EnumValue(aKey,0)[1].replace('Designer64.exe" "%1"','').replace('"','').strip()
        clr.AddReference(dirp + "NextFEMapi.dll")
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.