Hyperview - Get list of components and ids

Hello! I am a new to TCL scripting to work with Hyperworks tools. I need a TCL script for Hyperview that will read and write all the component names and their respective ids. Writing it to the clipboard for pasting or writing to a csv/excel file would be most helpful.
Thanks ahead of time!
Can some would suggest me script for read and write all the subcase names and their respective ids, for now to get all subcases names, I am using-
hwi GetSessionHandle mySessionName
mySessionName GetDataFileHandle myDataFile $op2File
set subcase_list [myDataFile GetSubcaseList]
puts 'subcase_list $subcase_list'
can some suggest script or code to find all Subcases ids with minimal changes in above.
For subcase names, pass result_handle GetSubcaseLabel $n_subcaseID
Hi,
It's fairly direct.