bopsneo.blogg.se

Xtools scale
Xtools scale










xtools scale

# Loop through existing layers to make replacements for them.įor lyr in (mxd): # list rather than go directly to index zero if that's not the case.ĭf = (mxd) Instead of applying symbology from these, why not add them as layers, replacing previous ones, then swap-out their data sources? I know that this will maintain symbology and label properties, at least, and I hope it also maintains things like visibility toggle and transparency, among others.

xtools scale xtools scale

lyr files with the desired properties set that you're loading from.

Xtools scale code#

Are there other alternatives besides extending code above, using ArcObjects, or dragging feature classes from one ArcMap window to another? This looks like a can of worms, however, for someone who is fairly new to the use of Python. I just found this link, which leads me to think ArcObjects in Python could be a solution to my question. Is there a quick way to change these other properties for many MXDs? This would not be an issue if lyr files captured the properties of table of contents visibility, label properties, feature scale range, or label scale range. # lyr filename matches FC ToC name less extensionĪrcpy.ApplySymbologyFromLayer_management(lyr, Mxd = ('Path\\' + doc)įor lyr in (mxd, item): I could use a script similar to that below, but would be required to (in addition to adding lines for the other properties) alter the feature class in ListLayers and the applicable properties many times in order to edit all the feature classes as needed. I need a process that is similar to said tool because I can run it in a fairly short script and apply it to all my MXDs. I have many feature classes that are repeatedly used in numerous MXDs for which I need to change these properties. Using the Applying Symbology from Layer tool appears to not capture a layer's table of contents visibility, label properties, feature scale range, or label scale range.












Xtools scale