SDF Component Toolkit Applications
|
185
oTlkt.BeginUpdate
j = 0
'Read from txt file till eof
Do While Not EOF(1)
'Get the feature data
Line Input #1, strObjType
Line Input #1, strKey
'Key
Line Input #1, strName
'Name
Line Input #1, strUrl
'Url
Line Input #1, strCnt
'Vertex count
'Read the geometry
For i = 1 To Val(strCnt)
Input #1, X
Input #1, Y
'Prepare a point feature
oPnt.SetCoordinates X, Y
'Add this point into the segment
oSeg.Add oPnt
Next i
'Now add this segment into the geometry
oGeom.Add oSeg
'Put this geometry into the feature
If strObjType = "POLYGON" Then
oObj.SetGeometry sdfPolygonObject, oGeom
ElseIf strObjType = "POLYLINE" Then
oObj.SetGeometry sdfPolylineObject, oGeom
ElseIf strObjType = "POINT" Then
oObj.SetGeometry sdfPointObject, oGeom
Else
ShowMessage "Unknown feature in input file."
End If
'Set the feature properties
oObj.Key = Trim(strKey)
oObj.Name = Trim(strName)
oObj.Url = Trim(strUrl)
'Add this feature to the SDF file
oTlkt.AddObject oObj
j = j + 1
'Clear the geometry before next use
oGeom.RemoveAll
oSeg.RemoveAll
Loop
'Wind up
oTlkt.EndUpdate
oTlkt.Close
ConvertSDF Example Code (
continued
)
Содержание 15606-011408-9300 - MAP R6.3 UPG
Страница 1: ...15306 010000 5060 October 2001 Autodesk MapGuide Release 6 Developer s Guide ...
Страница 6: ...vi ...
Страница 16: ...16 ...
Страница 30: ...30 ...
Страница 84: ...84 ...
Страница 134: ...134 ...
Страница 202: ...202 ...