I'm using ArcMap 10.

I'm importing several shp files with the same schema using the FeatureClassToGeodatabase tool in Arcpy and during the process I would also like to apply some standard symbology to the feature class. I was thinking I could use the ApplySymbologyFromLayer but it always errors out when I try to do it with a feature class in a GDB. It works fine with shp files when using the ArcMap built-in tool. So something is different when using a feature class within a GDB for the ApplySymbologyFromLayer.

So can I not keep a symbology stored with feature class when it's sitting in the Geodatabase? Meaning the symbology has to applied when I add the feature class to the data frame? Or can I use a Representation by using the Add Representation tool? When I use this it seems to always import the same symbology classification values from the original feature class the representation was created with.

closed as too broad by PolyGeo Feb 2 '16 at 10:04

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What are the errors you are getting? – Jakub Sisak GeoGraphics Sep 30 '11 at 2:03
  • It says Error 000622: Parameters are not valid. and Error 000732 Input features does not exist or or is not supported. What's strange is if I import the same layer file straight on the representation tab in ArcCatalog I get no errors. Regardless I don't think representations will work for me since they also import the classification ranges from the original layer file which doesn't work very good for new data. – wilbev Sep 30 '11 at 4:16

I see too many questions here.
I can tell you that after two weeks of head banging on the desk you won't want to tackle representations in python without knowing what the interface limitations are and what the ins and outs are.
Let me try to line out a few things.

  1. lyr files are simple enough to use for symbology "IF" the schema is the same. they have worked for me for years.
  2. symbology cannot be kept with a gdb. (wait for it)
  3. representations do not use symbols (esri) they use representation markers.
  4. representation rules and representation markers can live in the gdb.
  5. there is quite a steep learning curve (IMO because of the lacking interface
    and completeness of workflow capability). but I learn a little more each day.
  6. I don't dream that you haven't used the esri help before.

OK some facts I have learned about representations.
It takes a long time to build the rules.
If you symbolize on 1 field (not multiple) the data may be a good candidate for reps.
they cannot be created without extensive work to build a representation marker set.
even though you see representations in the symbol manager they don't use the standard esri symbol sets (of which there are thousands).
The field you symbolize on now will become a rule field which is domain type.

I will try to be clear and outline the workflow (one that almost works).
Caveat: I haven't used them on any datasets except point files.

in arcmap apply symbology to a layer.
right click "convert symbology to representation"

enter image description here
decide if you want to leave the geometry when editing or make it an override
also give your new feature class an alias that means something along with the rule field.
(this will become your new symbology field) (eventually you can delete the original)

enter image description here

In the layer dialog box, open the rep marker dialog by clicking the marker on the right pane.
Save it with a name. continue to select markers on the left pane and save them on the right pane until there are none left.
NOTE: You should treat this a bit like db design.
Plan out all of the markers you will need.
Organize them logically and then add them all in at once.

enter image description here

Note where the style file is being saved when you save the marker.
Again like db design. add all your markers, then add all your representations.
This is what this is great for.
With more than one representation (for scale, or map use, or user) you simply select a different rep and all you cartography is changed instananeously!

enter image description here

enter image description here

After you get all that added, go into the arccatalog or the attribute table and look at the domains.
1. you will have 1 rule field for each rep.
2. you will have 1 rule for each marker (1 for each original unique value).
now you can go into the domain or the rep in the layer dialog and start changing the value for each rule. Give it a meaningful name.
If you go to catalog and look at the domain the you will see where rule1 = usa, rule2 = italy, etc.

There are extensive help and tutorials but some of this stuff isn't in there. HTH

  • @ Brad, thank you very much for elaborate answer. I'm thinking the Representation may not be what I need. Maybe I just need to add the lyr file during a GP process in the properties. Any thoughts on that? How do you prefer to add standardized symbol to your layers? – wilbev Oct 1 '11 at 0:33
  • I think lyrs still have great use for that. I see rep being useful for quick change symbology of the same data (for different uses) and then of course if you ship out fgdb then whoever you send it to has your symbology automatically. But the work involved has to be worth it. I have been working with esri to get some enhancements in – Brad Nesom Oct 1 '11 at 14:27
  • One last question for you on representation. Is it possible to apply a rep created from one feature class to another without forcing the same classification range values from the feature class it was created from? So for example, say my top classification of say 3 classes is 240 to 300 in my original feature class, then when applied to this new feature class, whose top value is only say 260, it seems to apply the same cutoff, 240 in this case, which would be way off the best fits classification for this 2nd feature class. I want it to allow a best fits classification on this new fc. – wilbev Oct 1 '11 at 19:39
  • I do have some documentaion (googled) the helps with this. However - one thing that is hard to grasp about reps is there are two parts. The rep markers and the rules. The rep markers can be applied to rules easily, the rules then cause the object to display. The rule is a domain so each rule is "re-written" when using this process. – Brad Nesom Oct 1 '11 at 19:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.