Malinal Posted September 20, 2022 Share Posted September 20, 2022 Hello, I'm interested in listing the coordinates for the vertices of 2d features via python/vs. However, if I clip a hole out of the middle of the shape, I don't see any way to interact with the interior vertices of the resulting polylines. GetVertNum and the Object Info Palette both only list the vertices on the outside ring of the polyline. Is there something I'm missing here? I've attached an example, where VW displays 5 vertices instead of the desired 9. Thanks! Quote Link to comment
Pat Stanford Posted September 20, 2022 Share Posted September 20, 2022 Take a look at the GetHole and GetNumHoles functions. They will allow you to get a handle to the poly that defines the hole. From there you will be able to get the vertices you are looking for. Quote Link to comment
MullinRJ Posted September 20, 2022 Share Posted September 20, 2022 (edited) As usual, @Pat Stanfordbeat me to the punch 😉 Check out this example for reference. PROCEDURE xxx; VAR H, H1 :Handle; I :Integer; B :Boolean; BEGIN H := FSActLayer; { H is a handle to a Polyline } B := GetNumHoles(H, I); { I has the # of holes in the Polyline; and B is TRUE if (H<>nil) - Not very useful. } while (I > 0) do begin { loop through the holes } B := GetHole(H, I, H1); { H1 now has a handle to one of the hole objects } I := I - 1; end; { while } SysBeep; END; Run(xxx); Raymond Edited September 20, 2022 by MullinRJ 1 Quote Link to comment
Malinal Posted September 20, 2022 Author Share Posted September 20, 2022 Perfect! Thanks to you both! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.