- This topic has 0 replies, 1 voice, and was last updated 2 years, 5 months ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Home › Forums › Developer forum › Load API in Python without path
Tagged: api, autoloading, python
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")