Week - 8 - Creating component and property
AIM: To create a GUI for assigning the component name and property.
PROCEDURE:
- The component is created using *createentity comp with a name that user has entered in entry GUI
- similarly, the property is created using (*createentity prop)
- The thickness of the individual property is set using (*setvalue props ) command with the user-defined thickness
set n [ hm_getstring "components =" "Enter the name" ]
set t [ hm_getstring "thickness=" "Enter the value of the thickness" ]
set sol [hm_getsolver id]
# Starting the procedure for optistruct
if { $sol == 1 } {
proc optistruct { n t } {
*createentity comps includeid=0 name=$n$t
*createmark comps 1 $n$t
set compid [ hm_getmark comps 1 ]
*createentity props cardimage=PSHELL includeid=0 name=$n$t
*createmark props 2 $n$t
set propid [ hm_getmark props 2 ]
*setvalue props id=$propid STATUS=1 95=$t
*setvalue comps id=$compid propertyid={props $propid}
}
puts [ optistruct $n $t ]
}
#starting procedure for Radioss
if { $sol == 20 } {
proc radioss { n t } {
*createentity comps cardimage=Part includeid=0 name= $n$t
*createmark comps 1 $n$t
set compid [hm_getmark comps 1 ]
*createentity props cardimage=P1_SHELL includeid=0 name=$n$t
*createmark props 1 $n$t
set propid [hm_getmark props 1 ]
*setvalue props id=$propid STATUS=1 431=$t
*setvalue comps id=$compid propertyid={props $propid}
}
puts [ radioss $n $t ]
}