Automatic Feature Update

Land Desktop Map 3D Samples

 
Automatic Feature Update
 
 
 

You have added a class from an sdf schema to a map. You enabled Update Edits Automatically. You have added a feature to the layer containing the sdf vector data, and as a result the FeatureInsertedHandler called NewFeaturesourceIdentifier that was registered during the netload operation is run. It does the following:

  1. Uses the properites argument to create a filter string, creates an MgFeatureQueryOptions object and the sets the filter on this object to the value of the filter string.
  2. Uses an AcMapFeatureService object, the MgResourceIdentifier argument, the feature class name argument, and the MgFeatureQueryOptions object to select the feature from the feature source sdf file.
  3. Uses the MgFeatureReader object returned by the select operation to get an MgClassDefinition object.
  4. Uses the MgClassDefinition object to get an MgPropertyDefinitionCollection object.
  5. Use a custom UI class found in the UI folder and some system classes to create a custom dialog and uses the MgPropertyDefinitionCollection object to add field names and values to the custom dialog. If the field does not have a value, its input control in the dialog is given a value of (null).
  6. Uses the Autodesk.AutoCAD.ApplicationServices.Application class to expose the custom dialog.
  7. Extracts the values provided by the user from the dialog and uses them to create an MgPropertyCollection object.
  8. Uses the MgPropertyCollection object to create an MgUpdateFeatures object.
  9. Adds the MgUpdateFeatures object to an MgFeatureCommandCollection object.
  10. Uses the AcMapFeatureService object, the MgResourceIdentifier argument identifying the sdf feature source, and the MgFeatureCommandCollection object to update the feature in the sdf file.