The most common tool that folks use to check if a file already exists in the file system for a FullFileName, is the IO.File.Exists() method, which returns a Boolean. When using the ThisDoc tool, it will target the 'local' document (the document that the rule is saved within), by default, after that, it gets a little less clear. Or you could use the ThisApplication.ActiveDocument phrase to specify which document to target, but even that can be tricky at times. So, its up to you which document reference you want to use at the start of the rule, but if using the ActiveDocument route, I suggest not using the ThisDoc tool for any following purposes, because it might not be pointing to the same document.
Here is an example using entirely Inventor API code, instead of the iLogic shortcut snippets, just for reference.
I mentioned within that if you wanted, you could incorporate an Integer type variable as a Counter to try adding it to the end of the FileName (instead of " (iLogic Copy)"), then when it fails the test, try incrementing the Integer in a loop. I am not doing that here though.
'oDoc = ThisDoc.Document 'the document the rule is saved within, by default
Dim oDoc As Document = ThisApplication.ActiveDocument
oPathAndName = System.IO.Path.ChangeExtension(oDoc.FullFileName, vbNullString)
oExt = System.IO.Path.GetExtension(oDoc.FullFileName)
oNewFullFileName = oPathAndName & " (iLogic Copy)" & oExt
'could create an Integer Counter to add to end of FileName in a loop of Try attempts
If System.IO.File.Exists(oNewFullFileName) Then
oAns = MsgBox("A file with the following name already exists:" & vbCrLf & _
oNewFullFileName & vbCrLf & _
"Do you want to overwrite it?", vbYesNo + vbQuestion + vbDefaultButton2, "File Already Exists")
If oAns = vbNo Then Exit Sub
End If
oDoc.SaveAs(oNewFullFileName, True)
Wesley Crihfield

(Not an Autodesk Employee)