Hi,
lately, we experienced some strange behaviour with our software. A function which operates on the vertices of a polyline returned wrong results.
In the UI-ModelSpace of ACAD MAP 3D 2018, a questionable polyline is roughly located at coords (X: 390'000, Y: 5'612'000). When accessing the individual vertices of this polyline through
if (!(dbObject is Polyline)) return null; int vertexCount = (dbObject as Polyline).NumberOfVertices; result = new Point2d[vertexCount + 1]; for (int i = 0; i < vertexCount; i++) result[i] = ((Polyline) dbObject).GetPoint2dAt(i);
in C#-code, the resulting Point2d object has a X coordinate, which seems to be multiplied with a factor of -1, so the resulting X coord is at -390'
000, which causes problems. After looking around further, we found out this was related to a Ecs matrix with a "-1" component:
We have currently no idea where this originated. Our software definitely does not set Ecs.
My questions are:
1) Are there any UI-accessable tools, which may allow a user to set the Ecs matrix to a value differing from identy matrix, maybe in other ACAD verticals (ACAD Architecture may be involved)?
2) Is it possible to get rid of this through the UI?
3) Why is the polyline in ModelSpace drawn at 390'000, not respecting the ECS? If it was drawn at -390'000, it would be clearly visible that there is a problem with the data.
Any hints? We have no clue. 😞
Thank you.
Can't find what you're looking for? Ask the community or share your knowledge.