Results 1 to 3 of 3

Thread: Pulling coordinate entity of multiple objects

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Pulling coordinate entity of multiple objects

    Hello everybody,

    I have written a code to receive all 12 coordinates of 3dface object in to a single array.

    First I added object id's in to a single array by this code.
    For i = 0 To ss.Count - 1
    If ss.Item(i).ObjectName = "AcDbFace" Then
    ReDim Preserve xucgenmodel(w)
    xucgenmodel(w) = ss(i).ObjectID
    w = w + 1
    End If
    And then by using objectid's I am trying to pull all coordinates into single array by this code;

    For i = 0 To UBound(xucgenmodel)
    
    
    ReDim Preserve Ucgencoords(11 * (i + 1))
    
    
    Ucgencoords = ActiveDocument.ObjectIdToObject(xucgenmodel(i)).Coordinates
    
    
    Next i
    But here I have a problem each time it loops it resets the previous numbers and doesnt continue. Any help is appreciated.

    NOTES: 1 3DFACE HAS 12 COORDİNATES (starting from item(0) to item(11). So if I have 10 3DFACE's I should have 10*12= 120 rows array.
    Last edited by Bob Phillips; 12-16-2015 at 03:28 AM. Reason: Added VBA tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •