X Y coordinate list

P

PolyPusher

Guest
Hi All,

I have the following:

enterPt = enterPoint(?prompts list("Enter Ruler Start Point."))
startPt = geWindowToEditPoint(hiGetCurrentWindow() enterPt)

when( startPt
StartPtx = xCoord(startPt)
StartPty = yCoord(startPt)
)


StartXY=list(StartPtx:StartPty))------->>>>>>>>>>>> not working!

If StartPtx is 1 and StartPty is 2, the output I am looking for is
coordinates
1:2. This is to pass coordinates to SKILL that expects something
like
20.875:218.505. So really I don't want even a list.


Thank you for any help inadvance,
PolyPusher
 
PolyPusher <eric.d.fitzsimmons@gmail.com> writes:

Hi All,

I have the following:

enterPt = enterPoint(?prompts list("Enter Ruler Start Point."))
startPt = geWindowToEditPoint(hiGetCurrentWindow() enterPt)

when( startPt
StartPtx = xCoord(startPt)
StartPty = yCoord(startPt)
)


StartXY=list(StartPtx:StartPty))------->>>>>>>>>>>> not working!

If StartPtx is 1 and StartPty is 2, the output I am looking for is
coordinates
1:2. This is to pass coordinates to SKILL that expects something
like
20.875:218.505. So really I don't want even a list.
x:y is another syntax for (list x y), just slighly more conveniant to express
coordinates. So your startPt can be passed to whatever expect
20.875:218.505.

Yours

--
Jean-Marc
 
PolyPusher wrote, on 03/14/11 14:15:
On Mar 14, 8:59 am, Jean-Marc Bourguet<j...@bourguet.org> wrote:
PolyPusher<eric.d.fitzsimm...@gmail.com> writes:
Hi All,

I have the following:

enterPt = enterPoint(?prompts list("Enter Ruler Start Point."))
startPt = geWindowToEditPoint(hiGetCurrentWindow() enterPt)

when( startPt
StartPtx = xCoord(startPt)
StartPty = yCoord(startPt)
)

StartXY=list(StartPtx:StartPty))------->>>>>>>>>>>> not working!

If StartPtx is 1 and StartPty is 2, the output I am looking for is
coordinates
1:2. This is to pass coordinates to SKILL that expects something
like
20.875:218.505. So really I don't want even a list.

x:y is another syntax for (list x y), just slighly more conveniant to express
coordinates. So your startPt can be passed to whatever expect
20.875:218.505.

Yours

--
Jean-Marc- Hide quoted text -

- Show quoted text -

In this case I am using a replay file and some code that explicitly
needs x:y.

Here is what I see in the transrcript file


\i JPoverlapContact()
\i 20.875:218.505

So, I do need to know how to make 24:25 or whatever the numbers are.
I tried to pass list(x y) and it doesn't accept the syntax.

Thank you
Eric
Eric,

You should be able to use StartPtx:StartPty or list(StartPtx StartPty) . I see
no reason why either of those should not work. Your example has
list(StartPtx:StartPty) which will be a list of a list - so that's probably not
what you want.

Regards,

Andrew.
 
PolyPusher <eric.d.fitzsimmons@gmail.com> writes:

In this case I am using a replay file and some code that explicitly
needs x:y.

Here is what I see in the transrcript file


\i JPoverlapContact()
\i 20.875:218.505

So, I do need to know how to make 24:25 or whatever the numbers are.
I tried to pass list(x y) and it doesn't accept the syntax.
What are you trying to do? Write a replay file to execute it after?

Note that replay files isn't normal SKILL code and enter functions are
also strange beasts (they start a new top level while keeping some state
suspended, considering them as functions to which data can be fed will
fail in some cases, there are some functions which can be called just
*before* to set up things which would normally be given after, but
either I've missed something or they usually don't allow to do what I
want so trying to wrap them in a function with parameters will fail).

Yours,

--
Jean-Marc
 
Jean-Marc Bourguet <jm@bourguet.org> writes:

PolyPusher <eric.d.fitzsimmons@gmail.com> writes:

In this case I am using a replay file and some code that explicitly
needs x:y.

Here is what I see in the transrcript file


\i JPoverlapContact()
\i 20.875:218.505

So, I do need to know how to make 24:25 or whatever the numbers are.
I tried to pass list(x y) and it doesn't accept the syntax.

What are you trying to do? Write a replay file to execute it after?

Note that replay files isn't normal SKILL code and enter functions are
also strange beasts (they start a new top level while keeping some state
suspended, considering them as functions to which data can be fed will
fail in some cases, there are some functions which can be called just
*before* to set up things which would normally be given after, but
either I've missed something or they usually don't allow to do what I
want so trying to wrap them in a function with parameters will fail).
If my guess is correct, try with:

preXY(startPt)
JPoverlapContact()

(preXY is the function I was alluding to above, apparently, I
misremembered that there were several functions of that kind)

Yours,

--
Jean-Marc
 
On Mar 14, 8:59 am, Jean-Marc Bourguet <j...@bourguet.org> wrote:
PolyPusher <eric.d.fitzsimm...@gmail.com> writes:
Hi All,

I have the following:

enterPt = enterPoint(?prompts list("Enter Ruler Start Point."))
startPt = geWindowToEditPoint(hiGetCurrentWindow() enterPt)

      when( startPt
            StartPtx = xCoord(startPt)
            StartPty = yCoord(startPt)
   )

   StartXY=list(StartPtx:StartPty))------->>>>>>>>>>>> not working!

If StartPtx is 1 and StartPty is 2, the output I am looking for is
coordinates
1:2.   This is to pass coordinates to SKILL that expects something
like
 20.875:218.505.  So really I don't want even a list.

x:y is another syntax for (list x y), just slighly more conveniant to express
coordinates.  So your startPt can be passed to whatever expect
20.875:218.505.

Yours

--
Jean-Marc- Hide quoted text -

- Show quoted text -
In this case I am using a replay file and some code that explicitly
needs x:y.

Here is what I see in the transrcript file


\i JPoverlapContact()
\i 20.875:218.505

So, I do need to know how to make 24:25 or whatever the numbers are.
I tried to pass list(x y) and it doesn't accept the syntax.

Thank you
Eric
 
On Mar 14, 9:59 am, Jean-Marc Bourguet <j...@bourguet.org> wrote:
Jean-Marc Bourguet <j...@bourguet.org> writes:
PolyPusher <eric.d.fitzsimm...@gmail.com> writes:

In this case I am using a replay file and some code that explicitly
needs x:y.

Here is what I see in the transrcript file

       \i JPoverlapContact()
       \i 20.875:218.505

So, I do need to know how to make 24:25 or whatever the numbers are.
I tried to pass list(x y) and it doesn't accept the syntax.

What are you trying to do?  Write a replay file to execute it after?

Note that replay files isn't normal SKILL code and enter functions are
also strange beasts (they start a new top level while keeping some state
suspended, considering them as functions to which data can be fed will
fail in some cases, there are some functions which can be called just
*before* to set up things which would normally be given after, but
either I've missed something or they usually don't allow to do what I
want so trying to wrap them in a function with parameters will fail).

If my guess is correct, try with:

   preXY(startPt)
   JPoverlapContact()

(preXY is the function I was alluding to above, apparently, I
misremembered that there were several functions of that kind)

Yours,

--
Jean-Marc- Hide quoted text -

- Show quoted text -
I was getting confused, you were both correct that I did not need
the : in between the x and y coordinates and the preXY works great.
That is really cool. I am always amazed how many functions the public
has access to and how quickly you guys try to help out us poly
pushers.

Thank you both very much,
Eric
 

Welcome to EDABoard.com

Sponsor

Back
Top