Hi,
There are 2 problems in your code:
1. You should update the model bounds of the group using its UpdateModelBounds() method when you have finished adding shapes to it.
2. You should add a port to the group before trying to attch a connector to it as by default all shapes and groups not created by a shape factory do not have any ports.
You code should look like this:
// Create the group
NGroup group1 = new NGroup();
m_View.Document.ActiveLayer.AddChild(group1);
group1.Shapes.AddChild(step1);
group1.Shapes.AddChild(step2);
group1.UpdateModelBounds();
// Create a "Center" port for the group
group1.CreateShapeElements(ShapeElementsMask.Ports);
NPort port = new NDynamicPort(new NContentAlignment(ContentAlignment.MiddleCenter), DynamicPortGlueMode.GlueToLocation);
port.Name = "Center";
group1.Ports.AddChild(port);
group1.Ports.DefaultInwardPortUniqueId = port.UniqueId;
// Connect the "BEGIN" shape and the group
NStep3Connector connector = new NStep3Connector();
m_View.Document.ActiveLayer.AddChild(connector);
connector.FromShape = begin;
connector.ToShape = group1;
Best Regards,
Nevron Support Team