And the next question refers to c# itself...
I hope you "feel" what I want to do, I am a C# rookie.
C# is moaning, of course, because I want to assign new objects of similar, but different types.
(Python was very "tolerant" about that)
I hope MOPProfile, MOPPocket.... are derived from MachineOp ?
MachineOp profile;
switch (command)
{
case "I":
profile = new MOPProfile(newdoc, newdoc.Layers[LayerIndex].Entities.ToArray());
profile.InsideOutside = new CamBam.Values.CBValue<InsideOutsideOptions>(InsideOutsideOptions.Inside);
break;
case "O":
profile = new MOPProfile(newdoc, newdoc.Layers[LayerIndex].Entities.ToArray());
profile.InsideOutside = new CamBam.Values.CBValue<InsideOutsideOptions>(InsideOutsideOptions.OutSide);
break;
case "P":
profile = new CamBam.CAM.MOPPocket(newdoc, newdoc.Layers[LayerIndex].Entities.ToArray());
break;
}