poIResultMathCtrl GetResourceFilePath

Gets the file path of an external result math resource.

Syntax

rmath_handle GetResourceFilePath external_resource_label

Application

HyperView Tcl Query

Description

This command returns the path of the file which was used to add an external result math resource. When a model and result file is loaded with the “Standard” result math template, two default resources will be created (“model” and “result”). Please note that if the same file is used as model and result, then only one resource called “model” will be created.

In HyperView, you can add additional resource files using the AddResource command. Every resource that is added will have a label. This command does not return the file path of default resources “model” and “result” (you can use GetFileName and GetResultFileName on the model handle for getting the file paths of default resources), it only returns the file path for resources added using the AddResource command.

Inputs

external_resource_label
The label of the external resource.

Example

To get the path of an external result math resource:
hwi OpenStack
hwi GetSessionHandle session_handle
session_handle GetProjectHandle project_handle
project_handle GetPageHandle page_handle [project_handle GetActivePage]
page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]
window_handle GetClientHandle client_handle

set mid [client_handle AddResultMathAnalysis "c:/samples/bumper/d3plot" "c:/samples/bumper/d3plot"]

client_handle GetModelHandle model_handle $mid
model_handle GetResultCtrlHandle result_handle
result_handle GetResultMathCtrlHandle rmath_handle

set res_lab [rmath_handle AddResource "myres" "c:/samples/bumper_foam/d3plot"]
set file_path [rmath_handle GetResourceFilePath "myres"]
# file_path will contain the string "c:/samples/bumper_foam/d3plot"


hwi CloseStack

Errors

Returns an empty string if an error occurs.