Week 8 Challenge
CREATING COLLECTORS USING TCL/TK
OBJECTIVE:
To create various collectors with a single command for different solvers selected by the user.
PROBLEM STATEMENT:
Various solver has its own nomenclature to define an entity. It makes the user put more time to make corrections while changing the solver for simulations studied.
SOLUTION:
This program will get entity details from the user and creates a collector as per solver which has been selected by the customer.
PROCEDURE:
- Get data from users: This done by command “hm_getstring”.
- Create procedures for each solver given by hypermesh. Here (Optisturct, Radioss) is the title for the procedure which represented the solver’s name.
- As per solver requirements, components and property are created and card images assigned if necessary.
- Thickness value assigns to the property with its STATUS value.
- Property assigns to components using command “*setvalue”.
- Current solver information gets by command “hm_getsolver”.
NULL CASE:
- In case no entry entered by the user command won't create a collector.
- It creates a new component and property if the name doesn’t exist on the entity collector.
- Incase user-inputted name already exists, then the TK message box asks permission to overwrite the newly created component and property.
TCL COMMAND USED:
*createentity - Create a new collector (Component or property).
*setvalue -Assign a value for the collector (name, color, id, etc.,)
STATUS -Assign parameter values to the collector.
tk_messagebox -Shows a message box with pre-set options. Gets option from the user and give to command.
SAMPLE OUTPUT:
Created collectors with TCL command. Red represents optistruct and yellow represents radioss.



CONCLUSION:
Here TCL command for creating collectors are created and checked. The TCL command file attached with this document.