Feature class definitions are stored in XML files, external to the drawing file. Before definitions from a file can be used, the file must be attached to a drawing. There can only be one attached feature definition file active at one time for a given project.
In the UI, feature definition files are called object class definition files.
Creating Feature Definition Files
To create a feature definition file:
- Get the classification manager object for the project using ProjectModel.ClassificationManager.
- Create the new file using ClassificationManager.CreateFeatureDefinitionFile(). Note that the current user must have administrative privileges in the Map session. To check, test ClassificationManager.CanCurrentUserAlterSchema.
Dim classMgr As Classification.ClassificationManager
classMgr = activeProj.ClassificationManager
If (classMgr.CanCurrentUserAlterSchema) Then
Attaching and Detaching Feature Definition Files
To attach a feature definition file, call ClassificationManager.AttachFeatureDefinitionFile().
To detach the current file, call ClassificationManager.DetachCurrentFeatureDefinitionFile().