Hej. Dim linIDlista() As Stringange variabel som maxvärde i array
jag skulle vilja nyttja värdet i variabeln count som maxvärde i en array, dvs byta ut 5 i detta fall mot count?
...
Set ipEnumEIDInfo = ipEIDHelper.CreateEnumEIDInfo(m_ipEnumNetEID_Edges)
count = ipEnumEIDInfo.count
Dim linIDlista(1 To 5) As String
ipEnumEIDInfo.Reset
For i = 1 To count
' get the next EID and a copy of its geometry (it makes a Clone)
Set ipEIDInfo = ipEnumEIDInfo.Next
Set ipGeometry = ipEIDInfo.Geometry
Dim linNetwork As esriCore.INetwork
Dim linNetelements As esriCore.INetElements
Dim linUserClassID As Long
Dim linUserID As Long
Dim linUserSubID As Long
Dim linNextEID As Long
Dim linWhereClause As String
Set linNetwork = m_ipGeometricNetwork.Network
Set linNetelements = linNetwork
linNextEID = ipEIDInfo.EID
linNetelements.QueryIDs linNextEID, esriETEdge, linUserClassID, linUserID, linUserSubID
linIDlista(i) = "ID = " & linUserID
ipNewGeometryColl.AddGeometryCollection ipGeometry
linWhereClause = Join(linIDlista, " or ")
Next ' EID
...
Sv: ange variabel som maxvärde i array
ReDim linIDlista(count)
/Johan