TheSwamp
Code Red => .NET => Topic started by: ekoneo on April 21, 2014, 09:01:41 AM
-
When I renumber cogopoints whith:
for (uint i = 1, j = 1; i <100; i++)
{
if (!civdoc.CogoPoints.Contains(i))
{
}
else
{
CogoPoint pt = (CogoPoint)civdoc.CogoPoints.GetPointByPointNumber(i).GetObject(AcDb.OpenMode.ForWrite);
pt.Renumber(j, PointNumberResolveType.Overwrite);
j++;
}
}
"Retrive attribute failed" error message occured.. Does anybody know the reason?
-
It appears that this exception is thrown when you attempt to renumber a point to the same number. So you cannot renumber point # 1 to # 1.
-
Thanks Jeff_M;
Thats true..
I should make up a way ^-^
-
Thans Jeff_M;
I solved the problem by adding code part belowe:
if (pt.PointNumber != j)
{
pt.Renumber(j, PointNumberResolveType.Overwrite);
j++;
}
else
{
j++;
}
by the way renumber oparation ignoring when the point number is the same with for cycle's i value :kewl: