*get,prkey_,active,0,prkey
/nopr
mat_=arg1
*get,nummat_,parm,mat_name,dim,y
*if,nummat_,gt,0,then
arry_search,'mat_name','%mat_%'
*if,hits,eq,0,then
*dim,matbuff_,char,1,nummat_
*do,abcd_,1,nummat_,1
matbuff_(1,abcd_)=mat_name(1,abcd_)
*enddo
*set,mat_name(1),
*dim,mat_name,char,1,nummat_+1
*do,abcd_,1,nummat_,1
mat_name(1,abcd_)=matbuff_(1,abcd_)
*enddo
mat_name(1,nummat_+1)=mat_
*set,matbuff_(1),
*get,matpr_,parm,mat_prop,dim,x
*get,matpc_,parm,mat_prop,dim,y
*dim,matpbuf_,array,matpr_,matpc_
*do,bcde_,1,matpc_,1
*do,cdef_,1,matpr_,1
matpbuf_(cdef_,bcde_)=mat_prop(cdef_,bcde_)
*enddo
*enddo
*set,mat_prop(1),
*dim,mat_prop,array,matpr_,matpc_+1
*do,bcde_,1,matpc_,1
*do,cdef_,1,matpr_,1
mat_prop(cdef_,bcde_)=matpbuf_(cdef_,bcde_)
*enddo
*enddo
*get,matpc_,parm,mat_prop,dim,y
mat_prop(1,matpc_)=matpc_
col_=matpc_
*set,matpbuf_(1),
*else
col_=hit(1,2)
*endif
*do,abcd_,2,6,2
prop_=arg%abcd_%
*get,ptyp_,parm,prop_,type
*if,ptyp_,ne,0,then
prop_=upcase(prop_)
val_=arg%abcd_+1%
arry_search,'prop_lab','%prop_%'
row_=hit(1,1)
mat_prop(row_+1,col_)=val_
*endif
*enddo
*get,numprop_,parm,mat_prop,dim,x
*get,nummat_,parm,mat_name,dim,y
*do,abcd_,1,nummat_,1
mat_prop(1,abcd_)=abcd_
namhold_=mat_name(1,abcd_)
%namhold_%=abcd_
*enddo
*do,abcd_,1,nummat_,1
*do,bcde_,2,numprop_,1
mpval_=mat_prop(bcde_,abcd_)
*if,mpval_,ne,0,then
prop_=prop_lab(bcde_-1,1)
matnum_=mat_prop(1,abcd_)
mp,prop_,matnum_,mpval_
*endif
*enddo
*enddo
*else
mat_select,arg1
create_mat_prop,arg1,arg2,arg3,arg4,arg5,arg6,arg7
*endif
attrmat_=%arg1%
*set,prop_,
*set,val_,
*set,row_,
*set,col_,
*set,numprop_,
*set,nummat_,
*set,mat_,
*set,hits,
*set,abcd_,
*set,bcde_,
*set,cdef_,
*set,matnum_,
*set,mpval_,
*set,numprop_,
*set,nummat_,
*set,matpc_,
*set,matpr_,
*set,namhold_,
*if,prkey_,eq,1,then
/go
*endif