Answering my own question in case anyone finds it helpful. I was able to find a way to determine the cluster for a vector of data x_vec (assuming nclusters) using this script:
hc_lis = Hier Clust(x_vec);
ldr_vec = Eval(hc_lis[3]);
jnr_vec = Eval(hc_lis[4]);
c_vec = (1::NItems(ldr_vec))`; //initialize a vector that will become the cluster ids
For(i=1, i<=NItems(ldr_vec) - nclusters, i++,
loc_vec = Loc(c_vec, jnr_vec[i]);
c_vec[loc_vec] = ldr_vec[i];
);
c_aa = AssociativeArray(c_vec);
c_lis = c_aa << Get Keys; //list of just the cluster ids
This returns c_vec, which is a matrix the same size as x_vec, where c_vec[I] = the cluster id number of x_vec[I]. Also returned is c_lis, which is just a list of the cluster ids.
If there's a faster or more elegant way to do this, please let me know.