Hi,
I've created a MapTool that creates a line and places point features at the to/from point of the line. I use code like this to accomplish this....
I use this to get the sketch geometry to create the from point (connectionPoint) and to point (plugPoint):
var pointCollection = ((Multipart)geometry).Points;
MapPoint connectionPoint = pointCollection[0];
MapPoint plugPoint = pointCollection[pointCollection.Count - 1];
I then create the plugPoint like this:
var plugAttributes = new Dictionary<string, object>
{
{"SUBTYPECD", 4 },
{"DIAMETER1", 200 },
{"Shape", plugPoint.Clone() }
};
editOp.Create(waterFittingsLayer, plugAttributes);
Does using plugPoint.Clone create an EXACT clone?? Is there a more preferred way of doing this??
I'm finding that most of the time it does create the point correctly, but then other times the point created is not exactly the same. I cannot figure out why this is happening. Here are some screenshots of the values I am seeing. The first value is the TO point of the line and the second value is the 'cloned' point.
Hi Brian Bulla,
I asked Chris to reach out to you and get you going with the support issue. He should chime in here soon.
Thanks for your patience.
Hi Brian, as you're in Canada, it's best you start with your normal Support network, via Esri Canada.
Hi Guys,
OK, thanks. I will get that submitted on my end.
Wolfgang Kaiser; would it be possible for you to send me your test FGDB you were using? I have been doing more testing here, and get the same issue whether I am using our SDE or a FGDB. Just thought I'd try yours, since you mentioned you didn't have any problems with it.
Thanks,
Hi Brian Bulla,
I attached my SDE (Sql Server) geodatabase which has been copied by the map package geoprocessing tool into a file geodatabase. Let me know if anything is missing.
Thanks! As expected, it worked correctly everytime. I guess it must be something with our data. I'll keep you posted.