# ModelDirectory

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 `ModelSpec`) to verify that the input is correct.

  You can access the model directory using `RemoteModel.modelDirectory`.

Properties

- `displacementResultArray`
- `hasTransformationResult`
- `partInfoArray`
- `scalarResultArray`
- `setInfoArray`
- `simulationInfo`
- `stateGroupInfoArray`
- `stateInfoArray`
- `vectorResultArray`
- `vtfxCaseInfoArray`

Methods

- `getAllStateIds`
- `getDisplacementNameById`
- `getPartNameById`
- `getResultIdByIdString`
- `getResultIdStringById`
- `getResultInfoByIdString`
- `getScalarNameById`
- `getSetNameById`
- `getStateNameById`
- `getStateReferenceValueById`
- `getVectorNameById`
- `hasDisplacementResult`
- `hasScalarResult`
- `hasVectorResult`

## Properties

`ModelDirectory.``displacementResultArray`

  Type: | unknown

  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 `ModelSpec`.

`ModelDirectory.``hasTransformationResult`

  Type: | boolean

  Whether the model has a rigid body transformation result.

`ModelDirectory.``partInfoArray`

  Type: | unknown

  An array of the parts in the model. See `PartInfo` for more information about parts.

`ModelDirectory.``scalarResultArray`

  Type: | unknown

  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 `ModelSpec`, `CuttingPlanes`, `Isosurfaces`, `Isovolumes` or `ParticleTraceGroups`.

`ModelDirectory.``setInfoArray`

  Type: | unknown

  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 `ModelSpec`.

`ModelDirectory.``simulationInfo`

  Type: | SimulationInfo

  Meta data info for the current simulation

`ModelDirectory.``stateGroupInfoArray`

  Type: | unknown

  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 `StateGroupInfo.stateIdArr` when specifying state ids in the `ModelSpec.stateIdArray`.

`ModelDirectory.``stateInfoArray`

  Type: | unknown

  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 `ModelSpec`.

`ModelDirectory.``vectorResultArray`

  Type: | unknown

  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 `ModelSpec`, `CuttingPlanes`, `Isosurfaces`, `Isovolumes` or `ParticleTraceGroups`.

`ModelDirectory.``vtfxCaseInfoArray`

  Type: | unknown

  An array of cases present in the VTFx file. Use the format modelKey|caseId to open a specific case from a VTFx file.

## Methods

### getAllStateIds

`ModelDirectory.``getAllStateIds`()

  Returns an array of all state ids in the model.

  Useful for setting up an animation over all states.

  Return type: | [number]

### getDisplacementNameById

`ModelDirectory.``getDisplacementNameById`(id)

  Arguments: | id (`number`) – None

  Returns the name of the displacement result with the given id, or null if the id is invalid.

  Return type: | string

### getPartNameById

`ModelDirectory.``getPartNameById`(geometryIndex, id)

  Arguments: | geometryIndex (`number`) – None id (`number`) – None

  Returns the name of the part with the given geometryIndex/partId, or null if the geometryIndex/id pair is invalid.

  Return type: | string

### getResultIdByIdString

`ModelDirectory.``getResultIdByIdString`(resultType, idString)

  Arguments: | resultType (`ResultType`) – None idString (`string`) – None

  Find the result id of the result with the given type and `idString`.

  Returns -1 if the result `idString` was not found.

  Return type: | number

### getResultIdStringById

`ModelDirectory.``getResultIdStringById`(resultType, id)

  Arguments: | resultType (`ResultType`) – None id (`number`) – None

  Find the idString of the result with the given type and result id.

  Returns null if `id` was not found.

  Return type: | string

### getResultInfoByIdString

`ModelDirectory.``getResultInfoByIdString`(resultType, idString)

  Arguments: | resultType (`ResultType`) – None idString (`string`) – None

  Find the result info of the result with the given type and idString. Returns null when no match is found.

  Return type: | ResultInfo

### getScalarNameById

`ModelDirectory.``getScalarNameById`(id)

  Arguments: | id (`number`) – None

  Returns the name of the scalar result with the given id, or null if the id is invalid.

  Return type: | string

### getSetNameById

`ModelDirectory.``getSetNameById`(id)

  Arguments: | id (`number`) – None

  Returns the name of the element set with the given id, or null if the id is invalid.

  Return type: | string

### getStateNameById

`ModelDirectory.``getStateNameById`(id)

  Arguments: | id (`number`) – None

  Returns the name of the state with the given id, or null if the id is invalid.

  Return type: | string

### getStateReferenceValueById

`ModelDirectory.``getStateReferenceValueById`(id)

  Arguments: | id (`number`) – None

  Returns the reference value of the state with the given id, or undefined if the id is invalid.

  Return type: | number

### getVectorNameById

`ModelDirectory.``getVectorNameById`(id)

  Arguments: | id (`number`) – None

  Returns the name of the vector result with the given id, or null if the id is invalid.

  Return type: | string

### hasDisplacementResult

`ModelDirectory.``hasDisplacementResult`(stateId, resultId)

  Arguments: | stateId (`number`) – None resultId (`number`) – None

  Returns true if the given state contains the given scalar result id

  Return type: | boolean

### hasScalarResult

`ModelDirectory.``hasScalarResult`(stateId, resultId)

  Arguments: | stateId (`number`) – None resultId (`number`) – None

  Returns true if the given state contains the given scalar result id

  Return type: | boolean

### hasVectorResult

`ModelDirectory.``hasVectorResult`(stateId, resultId)

  Arguments: | stateId (`number`) – None resultId (`number`) – None

  Returns true if the given state contains the given vector result id

  Return type: | boolean

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Web or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...