enterPoint() wait?

E

Erik Wanta

Guest
I am trying to write a simple function to allow the user to add a
probe to a net of type "flight".

;deselect all objects
geDeselectAll()

;have user select a net
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint())

;add probe to net of type "flight"
geMakeProbeWithColor(?window hiGetCurrentWindow() ?object
car(geGetSelSet()) ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")

How do I get the program to wait until after the user selects a point
and then hits escape? That is, I don't want to add the probe until
after the enterPoint() function is complete.
---
Erik
 
Erik,
One way you could do this, is to let enter point make aanother
function call, something like this,
procedure(XXX()
enterPoints(
?prompts list("Enter points ")
?doneProc "XXA"
)
)

-- and then declare the function
procedure( XXA(window done points "wgl")
( blah bla blah))

The arguments to procedure XXA are pased by the system, and that
function is called only when the user has finished entering the
points...

Partha



erikwanta@starband.net (Erik Wanta) wrote in message news:<84018314.0309141751.83ce488@posting.google.com>...
I am trying to write a simple function to allow the user to add a
probe to a net of type "flight".

;deselect all objects
geDeselectAll()

;have user select a net
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint())

;add probe to net of type "flight"
geMakeProbeWithColor(?window hiGetCurrentWindow() ?object
car(geGetSelSet()) ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")

How do I get the program to wait until after the user selects a point
and then hits escape? That is, I don't want to add the probe until
after the enterPoint() function is complete.
---
Erik
 
OK, I am calling a function called ap after the point is selected. I
then try to add a probe to what I just selected, however geGetSelSet
fails for some reason.

I get:
\i fp()
\p >
\a mouseAddPt()
\i 0:-0.375
\w *WARNING* no object specified
\w *WARNING* Object not a dbId nor an object list
\w *WARNING* Can not make a probe record
\r t

If I do a geGetSelSet() after, I get:
(db:223997696)

Why doesn't the geGetSelSet() work in the ap function? This is
driving me nuts!

printf("fp()\n")

procedure(fp()
prog(()

geDeselectAll()
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint(?prompts
list("select net") ?addPointProc "ap"))

return(t)

) ; prog
) ; procedure



procedure(ap(w pts)
prog(()

geMakeProbeWithColor(?object car(geGetSelSet(w)) ?window
hiGetCurrentWindow() ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")
return(t)

)
) ; procedure


---
Erik




cadeguy@yahoo.com (Partha) wrote in message news:<7f58031f.0309151024.13dfada0@posting.google.com>...
Erik,
One way you could do this, is to let enter point make aanother
function call, something like this,
procedure(XXX()
enterPoints(
?prompts list("Enter points ")
?doneProc "XXA"
)
)

-- and then declare the function
procedure( XXA(window done points "wgl")
( blah bla blah))

The arguments to procedure XXA are pased by the system, and that
function is called only when the user has finished entering the
points...

Partha



erikwanta@starband.net (Erik Wanta) wrote in message news:<84018314.0309141751.83ce488@posting.google.com>...
I am trying to write a simple function to allow the user to add a
probe to a net of type "flight".

;deselect all objects
geDeselectAll()

;have user select a net
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint())

;add probe to net of type "flight"
geMakeProbeWithColor(?window hiGetCurrentWindow() ?object
car(geGetSelSet()) ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")

How do I get the program to wait until after the user selects a point
and then hits escape? That is, I don't want to add the probe until
after the enterPoint() function is complete.
---
Erik
 
Erik,

You are mixing using the return value of enterPoint and using callbacks to do
things. You should do _everything_ using the callback idiom, ideally.

Now (without actually trying this), I'm sure what is happening is that ap is
being called when you add the point, and then enterPoint() returns. So the
selection is going on _after_ you try to get the selection inside the callback.

Why not select it in the ap() function too? You have the point entered
as an argument to the ap() function, so use it there.

Probably I'd use ?doneProc anyway in this case, but I don't suppose it
makes much difference wth enterPoint since you're only entering a
single point.

Andrew.

On 15 Sep 2003 20:06:15 -0700, erikwanta@starband.net (Erik Wanta) wrote:

OK, I am calling a function called ap after the point is selected. I
then try to add a probe to what I just selected, however geGetSelSet
fails for some reason.

I get:
\i fp()
\p
\a mouseAddPt()
\i 0:-0.375
\w *WARNING* no object specified
\w *WARNING* Object not a dbId nor an object list
\w *WARNING* Can not make a probe record
\r t

If I do a geGetSelSet() after, I get:
(db:223997696)

Why doesn't the geGetSelSet() work in the ap function? This is
driving me nuts!

printf("fp()\n")

procedure(fp()
prog(()

geDeselectAll()
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint(?prompts
list("select net") ?addPointProc "ap"))

return(t)

) ; prog
) ; procedure



procedure(ap(w pts)
prog(()

geMakeProbeWithColor(?object car(geGetSelSet(w)) ?window
hiGetCurrentWindow() ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")
return(t)

)
) ; procedure


---
Erik




cadeguy@yahoo.com (Partha) wrote in message news:<7f58031f.0309151024.13dfada0@posting.google.com>...
Erik,
One way you could do this, is to let enter point make aanother
function call, something like this,
procedure(XXX()
enterPoints(
?prompts list("Enter points ")
?doneProc "XXA"
)
)

-- and then declare the function
procedure( XXA(window done points "wgl")
( blah bla blah))

The arguments to procedure XXA are pased by the system, and that
function is called only when the user has finished entering the
points...

Partha



erikwanta@starband.net (Erik Wanta) wrote in message news:<84018314.0309141751.83ce488@posting.google.com>...
I am trying to write a simple function to allow the user to add a
probe to a net of type "flight".

;deselect all objects
geDeselectAll()

;have user select a net
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint())

;add probe to net of type "flight"
geMakeProbeWithColor(?window hiGetCurrentWindow() ?object
car(geGetSelSet()) ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")

How do I get the program to wait until after the user selects a point
and then hits escape? That is, I don't want to add the probe until
after the enterPoint() function is complete.
---
Erik
--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
 
Andrew:
Yeah, chicken before the egg. The modified version is below. Does
anyone know of a public function to use other than _geGetProbeLPP(t)
to cycle through the y layers?

printf("afp()\n")

procedure(afp()
prog(()

geDeselectAll()

enterPoint(?prompts list("select net") ?addPointProc "afpCB")

return(t)

) ; prog
) ; procedure

procedure(afpCB(w pts)
prog((obj)

;select the point
geAddSelectPoint(w nil car(pts))

;get the selected object
obj=car(geGetSelSet(w))

;when the selected object is a net, add a flight probe
when(obj~>objType == "line"

;add a flight probe
geMakeProbeWithColor(?object obj ?window hiGetCurrentWindow()
?color
_geGetProbeLPP(t) ?probeType "net" ?displayStyle "flight")

) ; when

return(t)

) ; prog
) ; procedure

---
Erik

Andrew Beckett <andrewb@DELETETHISBITcadence.com> wrote in message news:<3n3dmvgfpji53b4qbrfaui16uc2qcdia34@4ax.com>...
Erik,

You are mixing using the return value of enterPoint and using callbacks to do
things. You should do _everything_ using the callback idiom, ideally.

Now (without actually trying this), I'm sure what is happening is that ap is
being called when you add the point, and then enterPoint() returns. So the
selection is going on _after_ you try to get the selection inside the callback.

Why not select it in the ap() function too? You have the point entered
as an argument to the ap() function, so use it there.

Probably I'd use ?doneProc anyway in this case, but I don't suppose it
makes much difference wth enterPoint since you're only entering a
single point.

Andrew.

On 15 Sep 2003 20:06:15 -0700, erikwanta@starband.net (Erik Wanta) wrote:

OK, I am calling a function called ap after the point is selected. I
then try to add a probe to what I just selected, however geGetSelSet
fails for some reason.

I get:
\i fp()
\p
\a mouseAddPt()
\i 0:-0.375
\w *WARNING* no object specified
\w *WARNING* Object not a dbId nor an object list
\w *WARNING* Can not make a probe record
\r t

If I do a geGetSelSet() after, I get:
(db:223997696)

Why doesn't the geGetSelSet() work in the ap function? This is
driving me nuts!

printf("fp()\n")

procedure(fp()
prog(()

geDeselectAll()
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint(?prompts
list("select net") ?addPointProc "ap"))

return(t)

) ; prog
) ; procedure



procedure(ap(w pts)
prog(()

geMakeProbeWithColor(?object car(geGetSelSet(w)) ?window
hiGetCurrentWindow() ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")
return(t)

)
) ; procedure


---
Erik




cadeguy@yahoo.com (Partha) wrote in message news:<7f58031f.0309151024.13dfada0@posting.google.com>...
Erik,
One way you could do this, is to let enter point make aanother
function call, something like this,
procedure(XXX()
enterPoints(
?prompts list("Enter points ")
?doneProc "XXA"
)
)

-- and then declare the function
procedure( XXA(window done points "wgl")
( blah bla blah))

The arguments to procedure XXA are pased by the system, and that
function is called only when the user has finished entering the
points...

Partha



erikwanta@starband.net (Erik Wanta) wrote in message news:<84018314.0309141751.83ce488@posting.google.com>...
I am trying to write a simple function to allow the user to add a
probe to a net of type "flight".

;deselect all objects
geDeselectAll()

;have user select a net
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint())

;add probe to net of type "flight"
geMakeProbeWithColor(?window hiGetCurrentWindow() ?object
car(geGetSelSet()) ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")

How do I get the program to wait until after the user selects a point
and then hits escape? That is, I don't want to add the probe until
after the enterPoint() function is complete.
---
Erik
 
Erik,

Not really very hard to write something, so I threw this together:

;------------------------------------------------------------------------
; This is SKILL++ code - it relies on lexical scoping to
; avoid global variables, so it needs a filename extension of .ils
;------------------------------------------------------------------------
(let ((colourNumber -1))
(setq ABgetProbeLPP
(lambda (@optional (incr t))
(or (geGetProbeUserLPP)
(list
(sprintf nil "y%d"
(if incr
(setq colourNumber
(mod (add1 colourNumber) 10))
(if (minusp colourNumber) 0 colourNumber)))
"drawing"))
))
)

Which behaves in the same way, and doesn't use any global variables (and
also supports use of geSetProbeUserLPP() to override the colour). In fact
mine fixes a feature of _geAddProbeLPP where if you call it with nil
as the argument, the first time, it returned "y-10" - mine returns "y0".

Andrew.


On 17 Sep 2003 11:13:14 -0700, erikwanta@starband.net (Erik Wanta) wrote:

Andrew:
Yeah, chicken before the egg. The modified version is below. Does
anyone know of a public function to use other than _geGetProbeLPP(t)
to cycle through the y layers?

printf("afp()\n")

procedure(afp()
prog(()

geDeselectAll()

enterPoint(?prompts list("select net") ?addPointProc "afpCB")

return(t)

) ; prog
) ; procedure

procedure(afpCB(w pts)
prog((obj)

;select the point
geAddSelectPoint(w nil car(pts))

;get the selected object
obj=car(geGetSelSet(w))

;when the selected object is a net, add a flight probe
when(obj~>objType == "line"

;add a flight probe
geMakeProbeWithColor(?object obj ?window hiGetCurrentWindow()
?color
_geGetProbeLPP(t) ?probeType "net" ?displayStyle "flight")

) ; when

return(t)

) ; prog
) ; procedure

---
Erik

Andrew Beckett <andrewb@DELETETHISBITcadence.com> wrote in message news:<3n3dmvgfpji53b4qbrfaui16uc2qcdia34@4ax.com>...
Erik,

You are mixing using the return value of enterPoint and using callbacks to do
things. You should do _everything_ using the callback idiom, ideally.

Now (without actually trying this), I'm sure what is happening is that ap is
being called when you add the point, and then enterPoint() returns. So the
selection is going on _after_ you try to get the selection inside the callback.

Why not select it in the ap() function too? You have the point entered
as an argument to the ap() function, so use it there.

Probably I'd use ?doneProc anyway in this case, but I don't suppose it
makes much difference wth enterPoint since you're only entering a
single point.

Andrew.

On 15 Sep 2003 20:06:15 -0700, erikwanta@starband.net (Erik Wanta) wrote:

OK, I am calling a function called ap after the point is selected. I
then try to add a probe to what I just selected, however geGetSelSet
fails for some reason.

I get:
\i fp()
\p
\a mouseAddPt()
\i 0:-0.375
\w *WARNING* no object specified
\w *WARNING* Object not a dbId nor an object list
\w *WARNING* Can not make a probe record
\r t

If I do a geGetSelSet() after, I get:
(db:223997696)

Why doesn't the geGetSelSet() work in the ap function? This is
driving me nuts!

printf("fp()\n")

procedure(fp()
prog(()

geDeselectAll()
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint(?prompts
list("select net") ?addPointProc "ap"))

return(t)

) ; prog
) ; procedure



procedure(ap(w pts)
prog(()

geMakeProbeWithColor(?object car(geGetSelSet(w)) ?window
hiGetCurrentWindow() ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")
return(t)

)
) ; procedure


---
Erik




cadeguy@yahoo.com (Partha) wrote in message news:<7f58031f.0309151024.13dfada0@posting.google.com>...
Erik,
One way you could do this, is to let enter point make aanother
function call, something like this,
procedure(XXX()
enterPoints(
?prompts list("Enter points ")
?doneProc "XXA"
)
)

-- and then declare the function
procedure( XXA(window done points "wgl")
( blah bla blah))

The arguments to procedure XXA are pased by the system, and that
function is called only when the user has finished entering the
points...

Partha



erikwanta@starband.net (Erik Wanta) wrote in message news:<84018314.0309141751.83ce488@posting.google.com>...
I am trying to write a simple function to allow the user to add a
probe to a net of type "flight".

;deselect all objects
geDeselectAll()

;have user select a net
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint())

;add probe to net of type "flight"
geMakeProbeWithColor(?window hiGetCurrentWindow() ?object
car(geGetSelSet()) ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")

How do I get the program to wait until after the user selects a point
and then hits escape? That is, I don't want to add the probe until
after the enterPoint() function is complete.
---
Erik
--
Andrew Beckett
Senior Technical Leader
Custom IC Solutions
Cadence Design Systems Ltd
 
Andrew:
Cool, I was unaware of the lexical scoping in SKILL++. I will read up.
---
Erik

Andrew Beckett <andrewb@DELETETHISBITcadence.com> wrote in message news:<4lqjmv80u2nrvvev68jonhq0ami6msaqpu@4ax.com>...
Erik,

Not really very hard to write something, so I threw this together:

;------------------------------------------------------------------------
; This is SKILL++ code - it relies on lexical scoping to
; avoid global variables, so it needs a filename extension of .ils
;------------------------------------------------------------------------
(let ((colourNumber -1))
(setq ABgetProbeLPP
(lambda (@optional (incr t))
(or (geGetProbeUserLPP)
(list
(sprintf nil "y%d"
(if incr
(setq colourNumber
(mod (add1 colourNumber) 10))
(if (minusp colourNumber) 0 colourNumber)))
"drawing"))
))
)

Which behaves in the same way, and doesn't use any global variables (and
also supports use of geSetProbeUserLPP() to override the colour). In fact
mine fixes a feature of _geAddProbeLPP where if you call it with nil
as the argument, the first time, it returned "y-10" - mine returns "y0".

Andrew.


On 17 Sep 2003 11:13:14 -0700, erikwanta@starband.net (Erik Wanta) wrote:

Andrew:
Yeah, chicken before the egg. The modified version is below. Does
anyone know of a public function to use other than _geGetProbeLPP(t)
to cycle through the y layers?

printf("afp()\n")

procedure(afp()
prog(()

geDeselectAll()

enterPoint(?prompts list("select net") ?addPointProc "afpCB")

return(t)

) ; prog
) ; procedure

procedure(afpCB(w pts)
prog((obj)

;select the point
geAddSelectPoint(w nil car(pts))

;get the selected object
obj=car(geGetSelSet(w))

;when the selected object is a net, add a flight probe
when(obj~>objType == "line"

;add a flight probe
geMakeProbeWithColor(?object obj ?window hiGetCurrentWindow()
?color
_geGetProbeLPP(t) ?probeType "net" ?displayStyle "flight")

) ; when

return(t)

) ; prog
) ; procedure

---
Erik

Andrew Beckett <andrewb@DELETETHISBITcadence.com> wrote in message news:<3n3dmvgfpji53b4qbrfaui16uc2qcdia34@4ax.com>...
Erik,

You are mixing using the return value of enterPoint and using callbacks to do
things. You should do _everything_ using the callback idiom, ideally.

Now (without actually trying this), I'm sure what is happening is that ap is
being called when you add the point, and then enterPoint() returns. So the
selection is going on _after_ you try to get the selection inside the callback.

Why not select it in the ap() function too? You have the point entered
as an argument to the ap() function, so use it there.

Probably I'd use ?doneProc anyway in this case, but I don't suppose it
makes much difference wth enterPoint since you're only entering a
single point.

Andrew.

On 15 Sep 2003 20:06:15 -0700, erikwanta@starband.net (Erik Wanta) wrote:

OK, I am calling a function called ap after the point is selected. I
then try to add a probe to what I just selected, however geGetSelSet
fails for some reason.

I get:
\i fp()
\p
\a mouseAddPt()
\i 0:-0.375
\w *WARNING* no object specified
\w *WARNING* Object not a dbId nor an object list
\w *WARNING* Can not make a probe record
\r t

If I do a geGetSelSet() after, I get:
(db:223997696)

Why doesn't the geGetSelSet() work in the ap function? This is
driving me nuts!

printf("fp()\n")

procedure(fp()
prog(()

geDeselectAll()
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint(?prompts
list("select net") ?addPointProc "ap"))

return(t)

) ; prog
) ; procedure



procedure(ap(w pts)
prog(()

geMakeProbeWithColor(?object car(geGetSelSet(w)) ?window
hiGetCurrentWindow() ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")
return(t)

)
) ; procedure


---
Erik




cadeguy@yahoo.com (Partha) wrote in message news:<7f58031f.0309151024.13dfada0@posting.google.com>...
Erik,
One way you could do this, is to let enter point make aanother
function call, something like this,
procedure(XXX()
enterPoints(
?prompts list("Enter points ")
?doneProc "XXA"
)
)

-- and then declare the function
procedure( XXA(window done points "wgl")
( blah bla blah))

The arguments to procedure XXA are pased by the system, and that
function is called only when the user has finished entering the
points...

Partha



erikwanta@starband.net (Erik Wanta) wrote in message news:<84018314.0309141751.83ce488@posting.google.com>...
I am trying to write a simple function to allow the user to add a
probe to a net of type "flight".

;deselect all objects
geDeselectAll()

;have user select a net
geAddSelectPoint(hiGetCurrentWindow() nil enterPoint())

;add probe to net of type "flight"
geMakeProbeWithColor(?window hiGetCurrentWindow() ?object
car(geGetSelSet()) ?color list("y0" "drawing") ?probeType "net"
?displayStyle "flight")

How do I get the program to wait until after the user selects a point
and then hits escape? That is, I don't want to add the probe until
after the enterPoint() function is complete.
---
Erik
 
Which behaves in the same way, and doesn't use any global variables (and
also supports use of geSetProbeUserLPP() to override the colour). In fact
mine fixes a feature of _geAddProbeLPP where if you call it with nil
as the argument, the first time, it returned "y-10" - mine returns "y0".
1. Andrew probably meant _geGetProbeLPP (not _geAddProbeLPP as there is no
SKILL function from Cadence of that second name).

2. Since the undocumented unsupported private function _geGetProbeLPP is
now known to the USENET world, just in case someone decides to use it,
I filed a PCR 647551 on behalf of Erik Wanta asking Cadence R&D if they
have a known existing public replacement handy.

Meanwhile, I also appended Andrew's suggested workaround and mailed Erik
to ask if he wanted to add any particulars.

Since it's a private function, the reputed bug Andrew found may not be
fixed; but, I requested that fix in addition to the public functionality.

3. In this manner, the Cadence SKILL Private Function Resolution Process
is being followed. This process basically has successfully replaced
private functions with public documented supported functionality
in more than 5,000 Customer migrations (at this time, I know of only 12
functions NOT successfully replaced with public functionality, i.e.,
the re-entrant layerXXX functions).

This is a wonderful win:win situation:
- Customer uses 100% documented supported known functions;
- Cadence supports only that public subset;

- If Customer has a need to use a private function ...
- A process is followed to ensure that private function use is
replaced by public functionality.

- Subsequent release-to-release migrations go much smoother
(the process is working!)
- And Cadence R&D & Marketing are aware of all the functions
Customers care about most.
(auto registration)

By the way, if you are NOT registering your functions with Cadence,
you're crazy ... as Cadence makes decisions about SKILL functions every
day ... and those not registered don't get their list of functions to be
considered ... (registration is automatic with any SKILL Survey) ...

--
This post is a PERSONAL opinion solely for the benefit of Cadence
Customers; and is NOT a company sanctioned statement.
 

Welcome to EDABoard.com

Sponsor

Back
Top