Hi Guys,
This is driving me nuts but here goes:
file = vault.GetFileFromPath(ppoData(index).mbsStrData1, folder)
state = file.CurrentState
If String.Compare(state.Name, "CURRENT", True) = 0 Then
folderExistMake(folder, folderFlags) 'my own sub nothing much here just a check to see if folder exists
If folderFlags = False Then
folder.CreateFolderPath("DocControlTemp\Obsolete", poCmd.mlParentWnd)
End If
releaseFolder = vault.GetFolderFromPath(folder.LocalPath + "\DocControlTemp")
ObsoleteFolder = vault.GetFolderFromPath(folder.LocalPath + "\DocControlTemp\Obsolete")
so that is pretty simple just get a file, check state, check to see if folder is there if not create folder. I then open the document in SW convert it to dwg save it at the new DocControlTemp folder(not shown). Then I wait to make sure file is added to location(also not shown).
Finally I call newfile.UnlockFile(poCmd.mlParentWnd, "Automatic Creation")...
Nothing to crazy here right? well what happens this line specifically shoots me back to the first line pasted. File does get checked in but the code just restarts at that line!
Before you ask, there is a loop but I got rid of it just to test and it still did the same thing... Is there an error I am not catching that is causing this, because I have tried.
This is making me go insane please help. If you would like project I can post....
Thanks,
David
SolidworksApi macros