mdlIModelClient GetMdlFileStatsList

Gets the details a file.

Syntax

mdlIModelClient_Handle GetMdlFileStatsListfilename, return_list

Application

MotionView Tcl Query

Description

This command retrieves the details of a file.

Inputs

filename
The full path of the file for which details are to be retrieved.
return_list
This is a boolean argument.
True
The file stats will be returned as a list.
False
The file stats will be returned as a name value map (a typical set of stats represented in the name value map is shown below):
FileType=ROOT BeginModelKeyExists=true EndModelKeyExists=true 
WizardSelectionsExist=false StandardInclude=FILE NumSystemDefinitions=0 
NumAssemblySelections=0 NumAnalysisSelections=0

Example

To get the details of a file:
Note: Load the slider_crank.mdl model file before running this example.
hwi GetSessionHandle sess1
sess1 GetProjectHandle pro1
pro1 GetPageHandle pa1 [pro1 GetActivePage]
pa1 GetWindowHandle win1 [pa1 GetActiveWindow]
win1 GetClientHandle mcl
set temp [mcl GetMdlFileStatsList slider_crank.mdl]
if {[lindex $temp 3] == "WizardSelectionsExists=false" } {
   puts "File does not contain wizard selections"
} else {
   puts "File contains wizard selections"
}

if {[lindex $temp 7] == "false" } {
   puts "File does not contain wizard selections"
} else {
   puts "File contains wizard selections"
}

mcl ReleaseHandle;
win1 ReleaseHandle;
pa1 ReleaseHandle;
pro1 ReleaseHandle;
sess1 ReleaseHandle;

Errors

Returns the file stats if successful. If there is an error, an error code will be returned.