Let's say you have a map with three or four data frames. In each data frame there is the same road layer. Is there a way to ensure that all the symbology/labeling/annotation is the same for that layer across all data frames. So let's say I modify the symbology of the road layer in data frame 1, is it possible to automate that change across all data frames?
|
Update: As you can see, this code doesn't handle group/composite layers (need to recursively search composite layers). And it's an ArcGIS 10 addin button and you are on 9.3. I'm putting code in this answer--it shouldn't hard to wire up to 9.3 (don't think I used anything new to 10):
Maybe a year ago, I was working on an ArcMap button that would keep layers in sync and along the same idea's as dmsnell's manual copy except that I was working to automate the process by updating layers with layers stored in a subversion repository. In my case, I had layer files in a subversion repository and I was looking to replace any layer in an MXD that was older than the layer file in my subversion repository. I think @dassouki question is the same except that instead of a layer in a subversion repository, his layer is the one he just modified. And he's only wanting to modify the MXD that he is in, rather than any MXD (although that is probably useful too). I think that it's just remove a layer and add a new layer (that is a copy) at the same location. This was work that was low priority for me and I stopped before it was completed, but I think I have some code for the layer operations(swap) buried somewhere. I'll look around and update this answer. The challenge for my solution was to uniquely identify layers (that would persist with the layer)--which I accomplished by using a guid in the layer extension properties. Given the number of end-users I support, using the layer name would be risky since the chance of a layer with different renderers having the same layer name is high. The amount of our layer modifications decreased and with the promise of web map services, this all seemed like overkill, so I stopped the work. The only thing I completed was an ArcMap button to modify the layer extension properties. Update: It just occurred to me that rambled on without actually answering the question of whether it is possible to automate layer changes across data frames. Yes, but not with out some custom code. |
|||||||||
|
|
You have to update each data frame manually, as far as I know. You can right-click on a layer and save it as a "Layer" file (.lyr), then right click on the other data frames and use the "Add Data" tool to find that saved layer file. If you make changes, just re-save that layer to the same .lyr file and delete and re-add it to each data frame. I've been looking for some kind of text-file based rules (such as XML) for describing the symbology and layering and be able to apply that to a map, where the map would reload that file at least at every program load, so I could just change the file but so far I haven't been able to find anything like that. |
|||
|
|
|
I agree with the aproach that dmsnell describes, but you can simply copy the layer from one Dataframe to another by a rightclick on the layer -> select copy -> rightclick the other Dataframe name -> select Paste Layer(s). I have not found any automation script or add-in to take care of this task. |
|||||||
|
|
There are a few automatic options you can use 1) Cartographic Representation Cartographic Representations add new fields to your geodatabase so that the symbology is stored in the data. This would allow you to make a change to the representation (using editing) so that any change you make will be reflected in all locations the representation is being used 2) Views and Visual Specifications Views are available with Production Mapping (Previously PLTS) and are stored Dataframe Properties and allow you to specify which components of a dataframe are being used from the stored database version of the Dataframe. Where As Visual Specifications are SQL Select Queries which are used in Production Mapping to assign Cartographic Representations based on attribute fields These are just some ideas, I will edit this and add more as I think of them, but based on you use case I would say carto Reps are the go, will need to be in either File Geodatabase or SDE. Have Fun, CDB |
|||
|
|