Notifications
Clear all

[Closed] User 3dsmax dir path in SDK c++

I’m looking for the user 3dsmax directory to get around permission problems on their c drive. I was saving to their 3dsmax folder with APP_MAX_SYS_ROOT_DIR.

But people have told me this give some permission write errors. I was looking for the path in the sdk that gives me…

C:\Users\THEIR_USER\AppData\Local\Autodesk\3dsMax\2017 – 64bit\ENU

does anyone know if there is a #define for this or did I need to find their user and make my own path?

Thanks

2 Replies

This looks like it works. Still if you know of a define, please let me know.

DWORD size = UNLEN + 1; 
GetUserName((TCHAR*)UserName, &size); 
swprintf(dir, MAX_PATH, L"C:\\Users\\%s\\AppData\\Local\\Autodesk\\3dsMax\\", UserName);


MSTR appDir = IPathConfigMgr::GetPathConfigMgr()->GetDir(APP_MAXDATA_DIR);

gives “C:\Users\<USER>\AppData\Local\Autodesk\3dsMax\2017 – 64bit\ENU”

gw