Hi,
i have a program to change the polyline3d. Something like
try
{
using (tr)
{
Polyline3d poly3d = (Polyline3d)tr.GetObject(oid, OpenMode.ForWrite); ObjectId[] verts = poly3d.Cast<ObjectId>().ToArray(); for (int i = 0; i < verts.Length; i++) { vt = tr.GetObject(verts[i], OpenMode.ForWrite) as PolylineVertex3d; vt.Position = new Point3d(X, Y, Z); }
tr.Commit();
}
}
catch
{
}
finally
{
tr.Dispose();
}
After that, the polyline3d changes perfectly. On the screen i can see the change. But when i run the command 3dorbit, then i see the polyline3d before the change.
You can see it on the Pictures
When i save the drawing and open it again, everthing is all right.
Can anyone tell me where the error is? 🙂
Thanks
Hi,
thanks for the help. Unfortunately this does not work. I remove tr.Dispose(), then i try this
using (tr) { try { } } catch { } finally { tr.Dispose(); }
without success.
It is interesting, that the problem comes after the second (and each next) call to 3dorbit command. When I change polyline3d and then call to 3dorbit for the first time, everthing is fine. It is a little bit confusing.
We need to see the whole function in order to diagnose the prolem.
Can't find what you're looking for? Ask the community or share your knowledge.