.. role:: clio-readonly
   :class: clio-flag clio-flag-readonly


##############
ModelDirectory
##############

.. js:class:: cee.ug.ModelDirectory

   The model directory contains a table of contents of what is available in the current CAE analysis. It has a list of all states/time steps, results and part infos in the model.
   
   The model directory can be used to populate a UI with the available states and results. It is used by property accessors when specifying results and states (e.g. in the :js:class:`ModelSpec <cee.ug.ModelSpec>`\ ) to verify that the input is correct.
   
   You can access the model directory using :js:func:`RemoteModel.modelDirectory <cee.ug.RemoteModel.modelDirectory>`\ .
   
   
   Index
   =====
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~cee.ug.ModelDirectory.displacementResultArray`
   * :js:data:`~cee.ug.ModelDirectory.hasTransformationResult`
   * :js:data:`~cee.ug.ModelDirectory.partInfoArray`
   * :js:data:`~cee.ug.ModelDirectory.scalarResultArray`
   * :js:data:`~cee.ug.ModelDirectory.setInfoArray`
   * :js:data:`~cee.ug.ModelDirectory.simulationInfo`
   * :js:data:`~cee.ug.ModelDirectory.stateGroupInfoArray`
   * :js:data:`~cee.ug.ModelDirectory.stateInfoArray`
   * :js:data:`~cee.ug.ModelDirectory.vectorResultArray`
   * :js:data:`~cee.ug.ModelDirectory.vtfxCaseInfoArray`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.ug.ModelDirectory.getAllStateIds`
   * :js:meth:`~cee.ug.ModelDirectory.getDisplacementNameById`
   * :js:meth:`~cee.ug.ModelDirectory.getPartNameById`
   * :js:meth:`~cee.ug.ModelDirectory.getResultIdByIdString`
   * :js:meth:`~cee.ug.ModelDirectory.getResultIdStringById`
   * :js:meth:`~cee.ug.ModelDirectory.getResultInfoByIdString`
   * :js:meth:`~cee.ug.ModelDirectory.getScalarNameById`
   * :js:meth:`~cee.ug.ModelDirectory.getSetNameById`
   * :js:meth:`~cee.ug.ModelDirectory.getStateNameById`
   * :js:meth:`~cee.ug.ModelDirectory.getStateReferenceValueById`
   * :js:meth:`~cee.ug.ModelDirectory.getVectorNameById`
   * :js:meth:`~cee.ug.ModelDirectory.hasDisplacementResult`
   * :js:meth:`~cee.ug.ModelDirectory.hasScalarResult`
   * :js:meth:`~cee.ug.ModelDirectory.hasVectorResult`
   
   



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: cee.ug.ModelDirectory.displacementResultArray

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | displacementResultArray: readonly  :js:class:`ResultInfo <cee.ug.ResultInfo>`\ []
      
      An array of the available displacement results in the model. The id's are unique and >= 0. The names describe the results. Use the Ids when specifying the displacement result id in the :js:class:`ModelSpec <cee.ug.ModelSpec>`\ .
      



.. js:data:: cee.ug.ModelDirectory.hasTransformationResult

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | hasTransformationResult: *boolean*
      
      Whether the model has a rigid body transformation result.
      



.. js:data:: cee.ug.ModelDirectory.partInfoArray

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | partInfoArray: readonly  :js:class:`PartInfo <cee.ug.PartInfo>`\ []
      
      An array of the parts in the model. See :js:class:`PartInfo <cee.ug.PartInfo>` for more information about parts.
      



.. js:data:: cee.ug.ModelDirectory.scalarResultArray

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | scalarResultArray: readonly  :js:class:`ResultInfo <cee.ug.ResultInfo>`\ []
      
      An array of the available scalar results in the model. The id's are unique and >= 0. The names describe the results. Use the Ids when specifying scalar result ids in the :js:class:`ModelSpec <cee.ug.ModelSpec>`\ , :js:class:`CuttingPlanes <cee.ug.CuttingPlane>`\ , :js:class:`Isosurfaces <cee.ug.Isosurface>`\ , :js:class:`Isovolumes <cee.ug.Isovolume>` or :js:class:`ParticleTraceGroups <cee.ug.ParticleTraceGroup>`\ .
      



.. js:data:: cee.ug.ModelDirectory.setInfoArray

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | setInfoArray: readonly  :js:class:`SetInfo <cee.ug.SetInfo>`\ []
      
      An array of the available element sets  in the model. The id's are unique and >= 0. The names describe the set. Use the Ids when specifying the visible sets in the :js:class:`ModelSpec <cee.ug.ModelSpec>`\ .
      



.. js:data:: cee.ug.ModelDirectory.simulationInfo

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | simulationInfo: :js:class:`SimulationInfo <cee.ug.SimulationInfo>`
      
      Meta data info for the current simulation
      



.. js:data:: cee.ug.ModelDirectory.stateGroupInfoArray

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | stateGroupInfoArray: readonly  :js:class:`StateGroupInfo <cee.ug.StateGroupInfo>`\ []
      
      An array of the available state groups in the model. The id's are unique and >= 0. The names describe the group. Use the property :js:data:`StateGroupInfo.stateIdArr <cee.ug.StateGroupInfo.stateIdArr>` when specifying state ids in the :js:func:`ModelSpec.stateIdArray <cee.ug.ModelSpec.stateIdArray>`\ .
      



.. js:data:: cee.ug.ModelDirectory.stateInfoArray

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | stateInfoArray: readonly  :js:class:`StateInfo <cee.ug.StateInfo>`\ []
      
      An array of the available states in the model. The id's are unique and >= 0. The names describe the states/time steps. Use the Ids when specifying state ids in the :js:class:`ModelSpec <cee.ug.ModelSpec>`\ .
      



.. js:data:: cee.ug.ModelDirectory.vectorResultArray

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | vectorResultArray: readonly  :js:class:`ResultInfo <cee.ug.ResultInfo>`\ []
      
      An array of the available vector results in the model. The id's are unique and >= 0. The names describe the results. Use the Ids when specifying vector result ids in the :js:class:`ModelSpec <cee.ug.ModelSpec>`\ , :js:class:`CuttingPlanes <cee.ug.CuttingPlane>`\ , :js:class:`Isosurfaces <cee.ug.Isosurface>`\ , :js:class:`Isovolumes <cee.ug.Isovolume>` or :js:class:`ParticleTraceGroups <cee.ug.ParticleTraceGroup>`\ .
      



.. js:data:: cee.ug.ModelDirectory.vtfxCaseInfoArray

      .. rst-class:: clio-flags
      
         :clio-readonly:`readonly`
      
      .. rst-class:: sig-pretty-signature
      
         | vtfxCaseInfoArray: readonly  :js:class:`VTFxCaseInfo <cee.ug.VTFxCaseInfo>`\ []
      
      An array of cases present in the VTFx file. Use the format modelKey\|caseId to open a specific case from a VTFx file.
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: cee.ug.ModelDirectory.getAllStateIds

      .. rst-class:: sig-pretty-signature
      
         | getAllStateIds(): *number*\ []
      
      Returns an array of all state ids in the model.
      
      Useful for setting up an animation over all states.
      
      **Returns**\ : *number*\ []
      



.. js:method:: cee.ug.ModelDirectory.getDisplacementNameById

      .. rst-class:: sig-pretty-signature
      
         | getDisplacementNameById(**id**\ : *number*\ ): *string*
      
      Returns the name of the displacement result with the given id, or null if the id is invalid.
      
      **Parameters**
      
      
         **id**\ : *number*
      
      
      **Returns**\ : *string*
      



.. js:method:: cee.ug.ModelDirectory.getPartNameById

      .. rst-class:: sig-pretty-signature
      
         | getPartNameById(**geometryIndex**\ : *number*\ , **id**\ : *number*\ ): *string*
      
      Returns the name of the part with the given geometryIndex/partId, or null if the geometryIndex/id pair is invalid.
      
      **Parameters**
      
      
         **geometryIndex**\ : *number*
      
         **id**\ : *number*
      
      
      **Returns**\ : *string*
      



.. js:method:: cee.ug.ModelDirectory.getResultIdByIdString

      .. rst-class:: sig-pretty-signature
      
         | getResultIdByIdString(**resultType**\ : :js:data:`ResultType <cee.ug.ResultType>`\ , **idString**\ : *string*\ ): *number*
      
      Find the result id of the result with the given type and ``idString``\ .
      
      Returns -1 if the result ``idString`` was not found.
      
      **Parameters**
      
      
         **resultType**\ : :js:data:`ResultType <cee.ug.ResultType>`
      
         **idString**\ : *string*
      
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.ModelDirectory.getResultIdStringById

      .. rst-class:: sig-pretty-signature
      
         | getResultIdStringById(**resultType**\ : :js:data:`ResultType <cee.ug.ResultType>`\ , **id**\ : *number*\ ): *string*
      
      Find the idString of the result with the given type and result id.
      
      Returns null if ``id`` was not found.
      
      **Parameters**
      
      
         **resultType**\ : :js:data:`ResultType <cee.ug.ResultType>`
      
         **id**\ : *number*
      
      
      **Returns**\ : *string*
      



.. js:method:: cee.ug.ModelDirectory.getResultInfoByIdString

      .. rst-class:: sig-pretty-signature
      
         | getResultInfoByIdString(**resultType**\ : :js:data:`ResultType <cee.ug.ResultType>`\ , **idString**\ : *string*\ ): :js:class:`ResultInfo <cee.ug.ResultInfo>`
      
      Find the result info of the result with the given type and idString. Returns null when no match is found.
      
      **Parameters**
      
      
         **resultType**\ : :js:data:`ResultType <cee.ug.ResultType>`
      
         **idString**\ : *string*
      
      
      **Returns**\ : :js:class:`ResultInfo <cee.ug.ResultInfo>`
      



.. js:method:: cee.ug.ModelDirectory.getScalarNameById

      .. rst-class:: sig-pretty-signature
      
         | getScalarNameById(**id**\ : *number*\ ): *string*
      
      Returns the name of the scalar result with the given id, or null if the id is invalid.
      
      **Parameters**
      
      
         **id**\ : *number*
      
      
      **Returns**\ : *string*
      



.. js:method:: cee.ug.ModelDirectory.getSetNameById

      .. rst-class:: sig-pretty-signature
      
         | getSetNameById(**id**\ : *number*\ ): *string*
      
      Returns the name of the element set with the given id, or null if the id is invalid.
      
      **Parameters**
      
      
         **id**\ : *number*
      
      
      **Returns**\ : *string*
      



.. js:method:: cee.ug.ModelDirectory.getStateNameById

      .. rst-class:: sig-pretty-signature
      
         | getStateNameById(**id**\ : *number*\ ): *string*
      
      Returns the name of the state with the given id, or null if the id is invalid.
      
      **Parameters**
      
      
         **id**\ : *number*
      
      
      **Returns**\ : *string*
      



.. js:method:: cee.ug.ModelDirectory.getStateReferenceValueById

      .. rst-class:: sig-pretty-signature
      
         | getStateReferenceValueById(**id**\ : *number*\ ): *number*
      
      Returns the reference value of the state with the given id, or undefined if the id is invalid.
      
      **Parameters**
      
      
         **id**\ : *number*
      
      
      **Returns**\ : *number*
      



.. js:method:: cee.ug.ModelDirectory.getVectorNameById

      .. rst-class:: sig-pretty-signature
      
         | getVectorNameById(**id**\ : *number*\ ): *string*
      
      Returns the name of the vector result with the given id, or null if the id is invalid.
      
      **Parameters**
      
      
         **id**\ : *number*
      
      
      **Returns**\ : *string*
      



.. js:method:: cee.ug.ModelDirectory.hasDisplacementResult

      .. rst-class:: sig-pretty-signature
      
         | hasDisplacementResult(**stateId**\ : *number*\ , **resultId**\ : *number*\ ): *boolean*
      
      Returns true if the given state contains the given scalar result id
      
      **Parameters**
      
      
         **stateId**\ : *number*
      
         **resultId**\ : *number*
      
      
      **Returns**\ : *boolean*
      



.. js:method:: cee.ug.ModelDirectory.hasScalarResult

      .. rst-class:: sig-pretty-signature
      
         | hasScalarResult(**stateId**\ : *number*\ , **resultId**\ : *number*\ ): *boolean*
      
      Returns true if the given state contains the given scalar result id
      
      **Parameters**
      
      
         **stateId**\ : *number*
      
         **resultId**\ : *number*
      
      
      **Returns**\ : *boolean*
      



.. js:method:: cee.ug.ModelDirectory.hasVectorResult

      .. rst-class:: sig-pretty-signature
      
         | hasVectorResult(**stateId**\ : *number*\ , **resultId**\ : *number*\ ): *boolean*
      
      Returns true if the given state contains the given vector result id
      
      **Parameters**
      
      
         **stateId**\ : *number*
      
         **resultId**\ : *number*
      
      
      **Returns**\ : *boolean*
      




