Message 1 of 2
Access to data objects
Not applicable
04-25-2008
04:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone
Many people asked about how to access to user data objects. I think the best way is this:
Dim cls_manager As Autodesk.Gis.Map.Classification.ClassificationManager = Nothing
cls_manager = Autodesk.Gis.Map.HostMapApplicationServices.Application.ActiveProject.ClassificationManager
Dim objClass_Property As FeatureClassPropertyCollection = New FeatureClassPropertyCollection()
Dim list_values As System.Collections.ArrayList = Nothing
cls_manager.GetProperties(objClass_Property, list_values, objId)
Dim Class_Property As FeatureClassProperty = Nothing
For Each Class_Property In objClass_Property
Dim propName As System.String = Class_Property.Name
Dim propValue As String = Class_Property.DefaultValue.ToString
Utility.ShowMsg(vbNewLine & propName)
Utility.ShowMsg(vbNewLine & propValue)
Next
I hope it will be useful for someone. . .
Suggestions?
Many people asked about how to access to user data objects. I think the best way is this:
Dim cls_manager As Autodesk.Gis.Map.Classification.ClassificationManager = Nothing
cls_manager = Autodesk.Gis.Map.HostMapApplicationServices.Application.ActiveProject.ClassificationManager
Dim objClass_Property As FeatureClassPropertyCollection = New FeatureClassPropertyCollection()
Dim list_values As System.Collections.ArrayList = Nothing
cls_manager.GetProperties(objClass_Property, list_values, objId)
Dim Class_Property As FeatureClassProperty = Nothing
For Each Class_Property In objClass_Property
Dim propName As System.String = Class_Property.Name
Dim propValue As String = Class_Property.DefaultValue.ToString
Utility.ShowMsg(vbNewLine & propName)
Utility.ShowMsg(vbNewLine & propValue)
Next
I hope it will be useful for someone. . .
Suggestions?