int Ns_TclGetSet2( Tcl_Interp *interp, char *setId, Ns_Set **setPtr );
Ns_TclGetSet2 returns the Ns_Set in setPtr for the specified set ID. It returns TCL_OK if the set ID is valid and found. It returns TCL_ERROR if the set is invalid or can't be found.
if (Ns_TclGetSet2(interp, argv[1], &set) != TCL_OK { return TCL_ERROR; }
You can then access the Ns_Set pointed to by set
.