DrawCommandHandler is not allowing to group nodes

I am using the DrawCommandHandler.js and now my diagram is not able to group nodes.

commandHandler: new DrawCommandHandler(),

to group nodes i am using
commandHandler.groupSelection();

Did you set CommandHandler.archetypeGroupData on the new instance of [Draw]CommandHandler?
CommandHandler | GoJS API

“commandHandler.archetypeGroupData”: {
text: " ",
isGroup: true,
color: “blue”,
key: uuidv4(),
},

i have now,

var groupTemplate = function () {
_DIAGRAM.DrawCommandHandler.archetypeGroupData = {
text: " ",
isGroup: true,
color: “blue”,
key: uuidv4(),
};
};

So in your running app, in the debugger, if you evaluate myDiagram.commandHandler.archetypeGroupData, do you get that data object?
(Substitute for myDiagram how you get a reference to the Diagram in your app.)

I am getting “null” and no data object

Then clearly you didn’t set that property on your new DrawCommandHandler.

Replaced it with this function, it is working!

var groupTemplate = function () {
_DIAGRAM.CommandHandler.archetypeGroupData = {
text: " ",
isGroup: true,
color: “blue”,
key: uuidv4(),
};
};

Thanks Walter!