title: Is it possible to open a Vivado project via Tcl and export it via write_project_tcl as Tcl?
body: <p>Xilinx Vivado can export the content of a *.xpr file (Xilinx Vivado project file) as Tcl. Therefore a Tcl command exists in GUI mode (project mode):</p>
  
  <pre><code>write_project_tcl {C:/.../project/KC705.tcl}
  </code></pre>
  
  <p>From a version control perspective, it's better to version control such Tcl files instead of *.xpr files, because *.xpr files contain XML with a steadily changing content (IDs, order of files, ...). One could consider *.xpr files as binary or at least not good for merging!</p>
  
  <p>Developers can forget to export their projects via menu: <code>file -&gt; write project tcl</code> or to enter that long Tcl command manually before closing the project in the GUI.</p>
  
  <p>Git offers pre-commit hooks. I would like to create a hook that converts (exports) a *.xpr file to a corresponding project tcl file.</p>
  
  <p>So my question is: <strong>How to open and export a *.xpr file (via Tcl?) to a project Tcl file?</strong> A Git shall never contain outdated project information, because a developer missed to click export in the menu.</p>