This document is archived and information here might be outdated. Recommended version. |
Creates a representation class.
[Visual Basic .NET] Public Function CreateRepresentationClass ( _ ByVal FeatureClass As IFeatureClass, _ ByVal Name As String, _ ByVal ruleIDFldName As String, _ ByVal overrideFldName As String, _ ByVal RequireShapeOverride As Boolean, _ ByVal Rules As IRepresentationRules, _ ByVal ClassAttributes As IGraphicAttributes _ ) As IRepresentationClass
[C#] public IRepresentationClass CreateRepresentationClass ( IFeatureClass FeatureClass, string Name, string ruleIDFldName, string overrideFldName, bool RequireShapeOverride, IRepresentationRules Rules, IGraphicAttributes ClassAttributes );
[C++]
HRESULT CreateRepresentationClass(
IFeatureClass* FeatureClass,
BSTR Name,
BSTR ruleIDFldName,
BSTR overrideFldName,
VARIANT_BOOL RequireShapeOverride,
IRepresentationRules* Rules,
IGraphicAttributes* ClassAttributes
);
[C++]
Parameters FeatureClass [in]
FeatureClass is a parameter of type IFeatureClass* Name [in]
Name is a parameter of type BSTR ruleIDFldName [in]
ruleIDFldName is a parameter of type BSTR overrideFldName [in]
overrideFldName is a parameter of type BSTR RequireShapeOverride [in]
RequireShapeOverride is a parameter of type bool Rules [in]
Rules is a parameter of type IRepresentationRules* ClassAttributes [in]
ClassAttributes is a parameter of type IGraphicAttributes*
CreateRepresentationClass method is used to create a new feature class representation . The feature class parameter is set to a valid feature class for which the representation class will be created. Creating a new feature class representation will result in addition of two new fields for storing the RepresentationRuleID IRepresentationClassName.RuleIDFldName and Overrides IRepresentationClassName.OverrideFldName in the feature class table.
A new RepresentationRules object has to be created or a reference to representation rules of an existing representation class has to be made prior to creating a new representation class. Use IRepresentationRules interface to create new rules object from scratch or use IRepresentationClass.RepresentationRules to get reference to an existing rules object.
Feature class representation names are unique within a single workspace. For enterprise databases, make sure that the fully qualified name is unique within the workspace. Thus, two different owners can create different representation classes with same name.
If a representation class exists in the same geodatabase with the given name, then CreateRepresentationClass will return an esriRepresentationError (REP_E_REP_CLASS_NAME_ALREADY_EXISTS).