Not sure about Last path used but see if following APIs help,
GetCurrentWorkingDirectory Method (ISldWorks)
SetCurrentWorkingDirectory Method (ISldWorks)
Thank you for your help. The reason for my thread is:
The article by Darin Grosser at DASI Solutions from 6/19/2014:
"Search Path Order for Opening Files in SolidWorks"
I think item:
4) LAST PATH USED BY THE SYSTEM:
can be problematic and the only way to avoid it seems to be a manual shutdown of SolidWorks. I am trying to find a way to programmatically skip this step as I have posted on 4/5/2015 in forum.solidworks.com/thread/92431The Mysteries of External References
Your help with GetCurrentWorkingDirectory & SetCurrentWorkingDirectory methods may work, it will take me a little time verify if that can clear "Last Path Used By The System".
Your help has allowed me to learn about:
SetSearchFolders Method (ISldWorks)
Sets the current folder search path as shown in Tools > Options > System Options > File Locations > Show folders for (Referenced Documents).
Search folder settings are ignored unless Tools > Options > System Options > External References > Search file locations for external references is selected. To get and set Search file locations for external references in the SolidWorks API, useswUserPreferenceToggle_e.swUseFolderSearchRules with ISldWorks::GetUserPreferenceToggle and ISldWorks::SetUserPreferenceToggle, respectively.
Show folders for - Referenced Documents - Folders
Your information was very helpful.