|
POST
|
Instead of using the focusmap property you need the pagelayout property to draw too. That means adding the graphic polygon element to the layout instead of the map. PageLayout can be cast into an ActiveView and you can deal add the polygon element and export that view. That should work ok but you will only see the rectangle if you switch your ArcMap view to layout. There is another way to do what you want with the data frame view (elements drawn to the map.) In ArcMap, right click on the dataframe name (layers by default.) Under labels, select label weight ranking. In the label weight ranking form, the first layer should be "default", set the feature weight to none. Your labels should appear through the polygon even if it has a fill. If your polygon is not drawn to the default annotation graphic layer, you will need to set the feature weight of whatever annotation graphic layer it is in. The problem is that a map annotation graphic layer acts a lot like a database annotation layer. Annotation and labels have weights to prevent them from overlapping. For most text annotation and text within a box (rectangle) you want this. In your case you don't, so you have to change the default properties. If you have elements in your graphics that you don't want to labels to overpost and so you do, you can create a new annotation group from the drawing menu of the drawing toolbar and set different properties.
... View more
06-27-2011
05:07 AM
|
0
|
0
|
273
|
|
POST
|
In that case the syntax will be tricky. You will need to see which string functions apply to your database's SQL. for featureclasses in oracle you can use INSTR to find the position of the dash, SUBSTR to get only the part before the dash, TO_DATE to convert it to date and finally you can do '<', '>' operations with the dates in the where clause. it works out to something similar to this in Oracle where = "TO_DATE( SUBSTR(DateUserField,1, INSTR(DateUserField, '-') -1), 'YYYYMMDD') < TO_DATE('23-06-2011', 'DD-MM-YYYY') AND TO_DATE( SUBSTR(DateUserField, INSTR(DateUserField, 1, '-') -1), 'YYYYMMDD') > TO_DATE('22-06-2011', 'DD-MM-YYYY')" For file geodatabase or shapefile, I don't know if you can do the string functions.
... View more
06-23-2011
12:45 PM
|
0
|
0
|
939
|
|
POST
|
I would recommend creating a separate date field and use the field calculator to copy only the part before the dash into it as a date. Then you can query dates with the greater than, less than comparison operators and date function. You then don't have to write any code to do it. If you must keep the field as is, depending on the database the data is in, in the where clause of a query filter, you can use string functions to recover the date part of the string, convert it to date and use a date comparison syntax supported by your database.
... View more
06-23-2011
10:00 AM
|
0
|
0
|
939
|
|
POST
|
I am not sure how to tell which is the default interface, I have never really thought of that. I guess I blindly cast when the compiler complains. I don't use the OMDs much. I remember looking at them 7-8 years ago in confusion. I know people who swear by them but I am not a visual person and I find there are far too many objects and interfaces and links between OMDs and assemblies, the OMDs are just not for me. I use the help files installed with the dev kit or the online ones. If that fails I look in this forum or on google, the OMD is pretty much the last place I look.
... View more
06-21-2011
09:09 AM
|
0
|
0
|
1106
|
|
POST
|
I have done graphics refresh and foreground refresh. Neither will refresh a geographic layer. Graphics refresh is for graphical elements (IElement) added to the graphics container of the activeview. They work quite well but the elements are not stored in the geodatabase (unless it is annotation), they are stored in mxd. Foreground drawing is trickier but I have used it with good results for non persisting geometries (custom rubber band when editing.) Foreground objects get cleared at every refresh and must be redrawn on the screendisplay in the activeview refresh event for refresh on the foreground phase. I found that gave me the best results for a geometry that changed quickly and often as a result of user interaction and I didn't need to store them at all. You could code a custom layer that draws to the foreground or to the graphic phase. ILayer.Draw method passes in the phase to draw to. That way you can chose which phase you want to draw to. Making custom layers increases the difficulty in supporting the code over time though.
... View more
06-20-2011
05:07 AM
|
0
|
0
|
1240
|
|
POST
|
If memory serves me IDocument is the default interface for the mxdocumentclass. The cast is not necessary. http://edndoc.esri.com/arcobjects/9.1/ExtendingArcObjects/Ch02/CodingInterfaces.htm The IDocument is in the framework namespace and the IMxDocument is in the ArcMapUI namespace. IDocument is a generic interface implemented by other types of document such as a ArcGlobe document (GMxDocument), ArcCatalog document (GxDocument), ArcScene (SxDocument) so it has to be a generic namespace implemented by all these applications. IMxDocument interface has methods and properties specific to the an ArcMap Document (*.mxd) it is only implemented by an MxDocumentClass in ArcMap.
... View more
06-20-2011
04:54 AM
|
0
|
0
|
1106
|
|
POST
|
That is because the activeview listeners are bound to a specific map or page layout. You can have multiple maps and one layout in a document with listeners on some of them but not others. If you open a new map you get a brand new set of maps and a layout with no listeners on them yet. You need to have listeners on the document events newDocument, OpenDocument and closeDocument. The new and open to set up your listeners on the appropriate maps and the closedocument to remove the listeners. Good luck.
... View more
06-17-2011
11:28 AM
|
0
|
0
|
1399
|
|
POST
|
Perhaps you could benefit from dynamic display (9.3) http://resources.esri.com/help/9.3/arcgisengine/dotnet/c9e1ccf5-df7d-44d3-a2da-d916f65fd94a.htm or basemap layers (arcgis 10) http://blogs.esri.com/Dev/blogs/arcgisdesktop/archive/2010/02/01/Basemap-Layers-_2D00_-New-at-ArcGIS-10.aspx Finally also in 10 is the graphic tracker http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000004tv000000
... View more
06-16-2011
07:34 AM
|
0
|
0
|
1240
|
|
POST
|
Just saw the update, I am still at SP1, I will check this out SP2. It is very relevant to my application.
... View more
06-13-2011
01:52 PM
|
0
|
0
|
1399
|
|
POST
|
MapAdmin has methods to fire that in turn triggers the layer added event, I don't think this is what you are looking for. A MapClass implements IActiveViewEvents which has itemAdded, ItemDeleted etc that will fire when a layer is added or removed.
... View more
06-13-2011
01:51 PM
|
0
|
0
|
1399
|
|
POST
|
It is difficult to provide any direction because it is not clear what you mean by drawing rectangles. The code sample provided shows how to add rectangle elements to the graphics layer of a map or page layout. This only persist in the mxd. Usually people want to store the data in a database or something. You can also draw directly to the activeview, it all depends on what you want the end result to be. Perhaps if you described how you go about doing in through the interface, it would provide more information.
... View more
06-10-2011
10:57 AM
|
0
|
0
|
674
|
|
POST
|
I too have had the same problem (was dealing with that Monday.) In my case I had an unversioned featuredataset with featureclasses, one of which had a 1:n forward relationship class. The problem only happened editing the origin featureclass using an update cursor (class happened to be anno.) I fixed it by setting the esriMultiuserEditSessionMode to non-versioned and getting rid of the operation. The strange thing is it shouldn't work at all (IMHO.) the SupportsMultiuserEditSessionMode(esriMESMVersioned) returned true even if the data was not versioned. The documentation says that if the data is versioned then it doesn't support non-versioned editing but I was expecting the other way around also... I am not sure what the implications of doing versioned editing on non-versioned data but I suspect it is not too good. Another developer made the same mistake in C++ (IWorkspaceEdit.StartEditing) and ended up creating a bunch of rows in the sde states and states_lineage tables with no way to compress them (compress just didn't remove them.)
... View more
06-09-2011
11:57 AM
|
0
|
0
|
701
|
|
POST
|
esri ComReleaser or interop marshalcomrelease release just your cursor so I would consider that superior. GC.Collect is a resource intensive process and doesn't always release the locks you might have on a file or database. So if the problem was too many still open cursors then yeah, I would say comreleaser is 'superior', kind of how scalpel is 'superior' to a chain saw for performing surgery but not for cutting trees.
... View more
06-09-2011
07:14 AM
|
0
|
0
|
652
|
|
POST
|
If you have ArcMap, can you add the csv in ArcMap? It could be a corrupt file...
... View more
06-09-2011
05:04 AM
|
0
|
0
|
690
|
|
POST
|
If there is no way to know what facilities are schools, you can't query data that is not there.
... View more
06-08-2011
08:03 AM
|
0
|
0
|
1164
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-02-2024 10:26 AM | |
| 1 | 07-05-2024 08:45 AM | |
| 1 | 10-05-2022 02:19 PM | |
| 6 | 03-27-2017 01:16 PM | |
| 1 | 05-05-2016 05:46 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-28-2025
07:37 AM
|