! TITLE: mat_extract.mac (MANAGEMENT) ! ! ! OBJECTIVE: ! ! This macro extracts a specified material property value from a specified ! material. ! ! ! COMMAND SYNTAX: ! ! MAT_EXTRACT, mat_prop, mat ! ! ! ARGUMENTS: ! ! mat_prop = selected material property to be extracted. ! ! mat = selected material to extract material property value from. ! ! DESCRIPTION: ! ! The user specified material property and material type is used to extract, ! from the material property matrix (array) 'mat_prop', a particular material ! property value. This value is returned in a parameter of the same name. ! ! EXAMPLE: ! ! It is desired to extract the material property, Young's Modulus, ! EX, from material AL6061. Therefore, this macro call is of the ! form: ! ! mat_extract,'ex','al6061' ! ! The desired material property value, EX, is returned in a ! parameter of the same name, 'ex'. ! ! ! ! *get,prkey_,active,0,prkey /nopr prop_=arg1 mat_=arg2 ! ! prop_=upcase(prop_) ! *get,nummat_,parm,mat_name,dim,y ! *if,nummat_,gt,0,then arry_search,'prop_lab','%prop_%' row_=hit(1,1) ! arry_search,'mat_name','%mat_%' col_=hit(1,2) ! %prop_%=mat_prop(row_+1,col_) *endif ! *set,prop_, *set,row_, *set,col_, *set,nummat_, *set,mat_, *set,hits, *if,prkey_,eq,1,then /go *endif