Sam Jones Posted June 13, 2019 Share Posted June 13, 2019 Is there a way to get the path to a workgroup folder? Quote Link to comment
DomC Posted June 28, 2019 Share Posted June 28, 2019 Hi As far as I know on Windows it is stored in the Registry in Current User and on Mac in the User/Library/Preferences. I am not sure if this works in your situation. With python I think it is easier to get access to the system files. Maybe this also would work with a pascal script ... Windows: from winreg import * aReg = ConnectRegistry(None,HKEY_CURRENT_USER) aKey = OpenKey(aReg, r"Software\Nemetschek\Vectorworks 24\General") WGF_Path = QueryValueEx(aKey, "Workgroup Folder 0") #vs.Message(WGF_Path[0]) target = WGF_Path[0] Macintosh: import plistlib MacFile = 'Users/userName/Library/Preferences/net.nemetschek.vectorworks.2019.plist' pl = {} with open(MacFile, 'rb') as fp: pl = plistlib.load(fp) vs.AlrtDialog(str(pl.get("NNA Workgroup Folders"))) vs.AlrtDialog(pl["NNA Workgroup Folders"]) I needed this for a quick and dirty job. For sure it could be enhanced as Example by not using a fix path for the user Name: import getpass var_username = getpass.getuser() 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.