POST
|
Hi, is still need help to Export my SimpleMarker´s on the map to an PDF or JPEG file. I have posted an fist Topic to this problem, but it seems that nobody had read it. (except AlBowe) http://forums.arcgis.com/threads/8319-Newbie-needs-help-with-pdf-export?p=25255#post25255 I have tried this ESRI example too with the same result. No SimpleMarkers are shown on the exportet File/Picture. http://edndoc.esri.com/arcobjects/9.2/net/ViewCodePages/ae109446-1798-41aa-b878-947425b360c9.ExportActiveViewCS_NetExportActiveViewCS_Net.cs.htm Please ...... somebody must help me!!!
... View more
07-20-2010
03:36 AM
|
0
|
1
|
383
|
POST
|
Thank you for your fast answer... but are you sure that it will works with Font-Collection ? I want to export the SimpleMarker and SimpleLine objects. I tried to convert the Code you gave me into c# but i was not successful. (sorry i am a noob :o) In your code snippet you used always "Set" .... what does this mean? (i never worked with vb) This is the code i produced... Maybe everything is wrong... i dont know.
IFontMapEnvironment pFME;
pFME = (IFontMapEnvironment)pExport;
IFontMapCollection pFMC;
pFMC = pFME.FontMapCollection;
IFontMap2 pFont;
pFont = new FontMap();
pFont.SetMapping("Arial", "Arial");
pFMC.Add(pFont);
pFont = new FontMap();
pFont.SetMapping("Arial Bold", "Helvetica-Bold");
pFMC.Add(pFont);
I hope you or somebody else can help me
... View more
07-16-2010
01:23 AM
|
0
|
0
|
114
|
POST
|
Hi, i am trainee who has the challange to work with ESRI (not easy :mad:) At first I have an GUI with an axMapControl. Now I want to save the active view of the map to an pdf file. But my export doesnt work with SipleMarker (these objects are not shown on the exportet picture/file) What can i do to export the SimpleMarker-Objects too?? My Simple marker with are drawing on the map (I also have some single Points)
private void drawGraphicLineOnMap(List<IPoint> points, IColor color, esriSimpleLineStyle style)
{
Polyline lines = new PolylineClass();
System.Object missing = Type.Missing;
foreach (IPoint point in points)
{
lines.AddPoint(point, ref missing, ref missing);
}
ISimpleLineSymbol lineSymbol = new SimpleLineSymbolClass();
lineSymbol.Style = style;
lineSymbol.Color = color;
lineSymbol.Width = 1;
System.Object objectMarker = (object)lineSymbol;
this.m_mapControl.DrawShape((IGeometry)lines, ref objectMarker);
}
here is my pdf export.
private void saveAsPDF()
{
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "Textdatei (*.pdf)|*.pdf";
saveFileDialog.Title = "Export active view to PDF";
saveFileDialog.RestoreDirectory = true;
saveFileDialog.FileName = System.IO.Path.Combine(saveFileDialog.InitialDirectory, "filename" + DateTime.Now.ToString("(dd-MM-yyyy_HH-mm-ss)"));
if (saveFileDialog.ShowDialog().Equals(DialogResult.OK))
{
//GeoPDF Konvertierung
IEnvelope pEnvelope;
pEnvelope = (IEnvelope)axMapControl1.ActiveView.Extent.Envelope;
IExport pExport;
pExport = new ExportPDFClass();
// Windows Auflösung ist 96, wir wollen aber in 300 exportieren
// Deswegen wird die Grö??e hier neu berechnet
System.Int32 screenResolution = 96;
System.Int32 outputResolution = 300;
pExport.Resolution = outputResolution;
ESRI.ArcGIS.Display.tagRECT rectangle;
rectangle.left = 0;
rectangle.top = 0;
rectangle.right = axMapControl1.ActiveView.ExportFrame.right * (outputResolution / screenResolution);
rectangle.bottom = axMapControl1.ActiveView.ExportFrame.bottom * (outputResolution / screenResolution);
EnvelopeClass pDriverBounds = new EnvelopeClass();
pDriverBounds.PutCoords((double)rectangle.left, (double)rectangle.bottom, (double)rectangle.right, (double)rectangle.top);
pExport.PixelBounds = pDriverBounds;
pExport.ExportFileName = @saveFileDialog.FileName;
//Exportieren
int hDC = pExport.StartExporting();
axMapControl1.ActiveView.Output(hDC, (int)outputResolution, ref rectangle, null, null);
pExport.FinishExporting();
pExport.Cleanup();
}
I hope somebody can help me.
... View more
07-15-2010
06:56 AM
|
0
|
2
|
739
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|