Get the number of point of a point selection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Get the number of point of a point selection

lechristophe
I'm sure this is trivial, but how can I get the number of points of a
multi-point selection (command / macro function) ? I can do Analyze>Measure
for the selection and retrieve the number of lines in the Results Table but
there is probably a more direct way.

Thanks !

Christophe
Reply | Threaded
Open this post in threaded view
|

Re: Get the number of point of a point selection

Gabriel Landini
On Wednesday 09 Feb 2011 21:52:29 you wrote:
> I'm sure this is trivial, but how can I get the number of points of a
> multi-point selection (command / macro function) ? I can do Analyze>Measure
> for the selection and retrieve the number of lines in the Results Table but
> there is probably a more direct way.

You could do:

getSelectionCoordinates(xCoordinates, yCoordinates);
print( lengthOf(xCoordinates) );

Cheers

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: Get the number of point of a point selection

lechristophe
That's exactly the kind of hack I could use. Thanks a lot Gabriel !

Christophe

On Wed, Feb 9, 2011 at 23:17, Gabriel Landini <[hidden email]> wrote:

> On Wednesday 09 Feb 2011 21:52:29 you wrote:
> > I'm sure this is trivial, but how can I get the number of points of a
> > multi-point selection (command / macro function) ? I can do
> Analyze>Measure
> > for the selection and retrieve the number of lines in the Results Table
> but
> > there is probably a more direct way.
>
> You could do:
>
> getSelectionCoordinates(xCoordinates, yCoordinates);
> print( lengthOf(xCoordinates) );
>
> Cheers
>
> Gabriel
>