hwIDataFile GetFilteredComponentList

Returns a list of all components for a given data type and request.


hwIDataFile_handle GetFilteredComponentList datatype, requestname, include_time


HyperWorks Tcl Query


This command returns a list of components for the specified datatype and request. It differs from GetComponentList in that it filters out components that are marked by the reader as not containing data.

Not all readers support this functionality (in fact, most do not). However, there are cases where a file only contains values for some components (X and Y, for example, but not Z) for specific requests. In readers that support this, the reader can specify that a component is empty, in which case it will be filtered out by this command.


The name of the data type that is being queried. Components vary by data type. For a list of data type names, use data_file_handle GetDataTypeList.
The name of the request to be used as a filter. Components vary by request. For a list of request names, use data_file_handle GetRequestList. This command is useful to construct lists in the GUI where you want to provide the user with a list of useful choices based on past selections (datatype and request). However, it is only useful in cases where a specific request has already been selected. Otherwise, GetComponentList must be used.
include_time (Optional)
A filter that deteremines if Time is to be included as a component. This is not a normal component and defaults to false.


set filename "C:/Altair/hw10.0/tutorials/mv_hv_hg/plotting/modal_participation.f06";
hwi OpenStack;
hwi GetSessionHandle sess1;
sess1 GetDataFileHandle dh $filename;
set listSubcases [dh GetSubcaseList];
dh SetSubcase [lindex $listSubcases 0];
puts "Current subcase = [dh GetSubcase]";
set listDatatypes [dh GetDataTypeList];
puts "\nDatatypes for subcase [dh GetSubcase] = $listDatatypes";
set listReqs [dh GetRequestList [lindex $listDatatypes 1]];
puts "\nRequests for [lindex $listDatatypes 1] datatype = $listReqs";
set listComps [dh GetComponentList [lindex $listDatatypes 1] [lindex $listReqs 1]];
puts "\nTotal # of components for [lindex $listReqs 1] = [llength $listComps]";
puts "\nComponents for [lindex $listReqs 1] request = $listComps";

set filtlistComps [dh GetFilteredComponentList [lindex $listDatatypes 1] [lindex $listReqs 1]];
puts "\nTotal # of filtered components for [lindex $listReqs 1] = [llength $filtlistComps]";
puts "\nFiltered Components for [lindex $listReqs 1] request = $filtlistComps";

hwi CloseStack; 


If the datatype/request combination is not present in the file, an empty string will be returned.



XY plot