.. _spruce_examples_validate_design_unit:

Validate Structure of the Design Unit
================================================================================

This example validates the structure of the design unit.

.. seealso::
  * :ref:`OEValidateDesignUnit <OESpruce_OEValidateDesignUnit>` class
  * :ref:`OEDesignUnitIssueCodes <OESpruce_OEDesignUnitIssueCodes>` namespace

Example
--------------------------------------------------------------------------------

.. oe:language:: python

    .. code-block:: console

        prompt> validate_design_unit.py <input design unit>


Code
--------------------------------------------------------------------------------

.. oe:language:: python

   .. only:: oehtml

      .. admonition:: Download code

         :download:`validate_design_unit.py <../../../../wrappers/python/examples/spruce/validate_design_unit.py>`

   .. :ref:`Full listing. <listing-validate_design_unit.py>`

   ..   literalinclude:: ../../../../wrappers/python/examples/spruce/validate_design_unit.py

.. wrappers/python/examples/spruce/validate_design_unit.py
.. rstdocs/toolkits/sprucetk/examples_validate_design_unit.rst

   .. only:: oepdf

      .. oe:source:: validate_design_unit.py
         :language: python