4002/4102: Could not open filename for writing.

Cause

The output file given in the code generation settings could not be opened for writing, probably due to one of the following:

  1. The folder doesn't exist.
  2. The file already exists and is write-protected.
  3. The file already exists and is open in another application.

Resolution

In the Code Generation Settings, click Browse... by Output File and select an existing folder and a new file name.