selectionType()

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

selectionType()

Roberto Sotto-Maior Fortes de Oliveira
I am trying to write a macro code to orient an unskilled user during a
point selectioning specific application.

However, the selectionType()macro function results value 10 for both Point
and Multi-Point Selection Tools.

If the result for both tools could be different I would write the code as:

/////////////

do {

waitForUser("You must select your first point using the Point or Multi-
Point Tools");

selection = selectionType();

} while (selection < 10);

if (selection == 10)

waitForUser("Choose your next two points! You must hold down the shift
key");

if (selection == 11)  // a fictional value suggested for the multi-point
tool

waitForUser("Choose your next two points!");

///////////

Any suggestion for a code to perform in similar way?


Sincerely,

Roberto Sotto-Maior
Reply | Threaded
Open this post in threaded view
|

Re: selectionType()

Gabriel Landini
On Saturday 21 November 2009, Roberto Sotto-Maior Fortes de Oliveira wrote:
> I am trying to write a macro code to orient an unskilled user during a
> point selectioning specific application.
>
> However, the selectionType()macro function results value 10 for both Point
> and Multi-Point Selection Tools.

For the pojnt selection (single or multiple) you can find out if you have more
than one point selected via the length of the arrays that hold the
coordinates.

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

G.
Reply | Threaded
Open this post in threaded view
|

Re: selectionType()

Roberto Sotto-Maior Fortes de Oliveira
In reply to this post by Roberto Sotto-Maior Fortes de Oliveira
Thank you Gabriel for your reply.
The example code given is only to help me addressing the question.
I would like to readdress it.
In the macro code scope, I would like to know which tool method(point or
multipoint) the user selected during the waitForUser() command. It could
be done if:
1)The selectingType() returns different values for point or multipoint.
2)Better done if the toolID returns different values for both tools ( but
the returned value is 7 for both).
3)However it is possible to Set the appropriate tool with the setTool
(“point”) or setTool(”multipoint”) commands.
4)But it is not possible to use the setTool(id) to selectively choose them
as their ID is the same.
The suggestion/question here is that it could be usefull (and it is my
needing) if one could distinguish between “point” and “multipoint” tools
within the macro programming scope.
Sincerely,

Roberto Sotto-Maior