PDA

View Full Version : Line Drawn in Any Weight Greater Than 1 Changes To 1/MapPoint 2004



SatelliteSurfer
09-23-2013, 06:59 PM
Greetings!

I was making an update to my MapPoint add-in. I have MP 2004 on my machine and have always used it for testing. When I went to evaluate a line drawing section of the add-in, it appeared MapPoint ignored what the add-in assigned for Weight to the Shape object:


myShape.Line.Weight = 3;

I thought it was the changes I made to the add-in until I tried drawing lines using the tools in MapPoint. For example, I selected the Scribble tool and set the Line Style to 12pt. When I was drawing the line, the weight was 12pt. When I completed drawing, the line weight changed to 1pt. In the past, the line remained 12pt, and my add-in drew lines in assigned weights.

My machine is a Dell Inspiron laptop using Window 7 Home Premium SP1. I use VS2008 for development of my add-in.

Any ideas?

Thanks,
Joe

Eric Frost
09-24-2013, 08:13 AM
I don't know, but if there's a COM Add-in loaded that intercepts the SelectionChanged event, that could be automatically changing the line weights of the selected object.

I don't know why there would be a COM Add-in loaded on your machine to do that, but it's the only thing I can think of ?? Otherwise what would be intercepting and changing the line weights.

Have you tried a different version of MapPoint? There's a 14 day trial version of MapPoint 2013.

Eric

SatelliteSurfer
09-24-2013, 06:33 PM
Thanks for the quick response, Eric!

I thought it might be something like that as well (I might have been shutting down some services out of frustration with machine performance - may have shut down one too many). I uninstalled and installed MP2004, and the line weights were displaying as expected.

Thanks for the tip on MP2013!

Joe

Eric Frost
09-25-2013, 07:39 AM
So it's working now?

Did you figure out what was causing that behavior?

Thanks!
Eric

SatelliteSurfer
09-25-2013, 05:41 PM
Hello Eric!

Yes, after re-installing, MapPoint draws lines in the size specified by the Line Style, and my add-in draws lines in the Line Style and Color I expect.

I did not determine what caused the behavior. I thought it might have been some of the Services I shut down. In thinking about it more, I did change how my add-in starts. I wondered if it caused the marshaling between COM and .NET to present data to MapPoint in such a way that the rendering was impacted. I changed it back and the behavior persisted. After uninstalling and re-installing did MapPoint behave as expected.

Joe