Project - 2 - Generating the report for hypermesh file
Objective:
The final goal is to create an ergonomic and visually appealing excel (.xlsm) report that contains following information about your model:
User name, date, time.
Profile/deck.
count of component, prop, material, elements.
Count of empty comp/prop/mats.
Elements failed in all qualities or duplicates.
If there is any empty component/prop/mat or any duplicate or failed element, it should be highlighted as red.
Procedure:
Use $env(USERNAME) command to get the user name of the respective computer.
Using hm_info templatetype syntax the user profile for the .hm file is found and stored in a separate variable.
Create a variable and save all the required data in that variable.
As previously done, components count, elements count, materials count and property count are saved in the mark IDs using hm_marklength command.
A variable named file is created and all the details are saved in that argument.
Also empty entities are highlighted by changing the component color to red. Using *setvalue command colour is assigned.
All the unused components, materials and properties are saved in the variable file.
Element quality check like warpage, aspect ratio and other qualities are checked.
All the failed elements are also collected and stored in the file argument.
Finally property and materials that are assigned to respective components are checked.
Using foreach statement andhm_getvalue command the properties and materials that are assigned to respective components are found and stored in a variable.
These variables saved to the file argument.
Result:
puts command is used and all the data that are saved is displayed used that puts command.
Thus all the required details of the components and other entities are displayed.