Hi,
I’m automating a process that generate text files. In the second iteration I get this error
this object cannot be modified because it is controlled by a document
The function that lauch the exception is:
public static void TrasladarModelo(ref RhinoObject obj, Punto3D hasta)
{
try
{
// This line launch an exception
var xForm = Transform.Translation(hasta.X, hasta.Y, hasta.Z);
obj.CommitChanges();
RhinoDoc.ActiveDoc.Objects.Transform(obj, xForm, true);
}
catch (Exception ex)
{
Log log = new Log(Utilidades.GetRutaLog(), false);
log.LogMensaje("ComandoRhino.TrasladarModelo", ex.Message);
throw ex;
}
}
This function was developed by other person, and I don’t understand well the code.
But… what can be produced this error? and how solve?
I’m working with Visual Studio and RhinoCommon