Help VBA How to extract symbology settings to xml or txt (CAD Polyline Feature)

523
0
11-15-2010 08:46 AM
StefanoFerri
New Contributor
Hello i am tring to write a simple VBA macro to extract a txt file with the RGB colors of a CAD Polyline Feature.

Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument
Dim pApp As IMxApplication
Set pApp = Application
Dim pDoc As IMxDocument
Set pDoc = ThisDocument
Dim pMap As IMap
Set pMap = pDoc.ActiveView.FocusMap
Dim pFeatLyr As IFeatureLayer
Dim i As Long
' run through the layers and get the first featurelayer
For i = 0 To pMap.LayerCount - 1
    If TypeOf pMap.Layer(i) Is IFeatureLayer Then
      Set pFeatLyr = pMap.Layer(i)
      Exit For
    End If
  Next i
Dim pColor As IRgbColor
  Set pColor = New RgbColor
  ' use red. it's a good color
  pColor.RGB = vbRed


pFeatLyr is my CAD Polyline Feature ... i dont know how to procede to read the color classification.... Help pls
Tags (2)
0 Kudos
0 Replies