D
Dominic Duvarney
Guest
Is there a trigger for switching between a schematic and a layout
window and vice versa?
thanks,
Dominic DuVarney
window and vice versa?
thanks,
Dominic DuVarney
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
run a function when I switch between a schematic and layout.Is there a trigger for switching between a schematic and a layout
window and vice versa?
thanks,
Dominic DuVarney
Correction, I don't want a trigger for switching between the 2, I want to
Hi Dominic,Dominic Duvarney wrote:
Is there a trigger for switching between a schematic and a layout
window and vice versa?
thanks,
Dominic DuVarney
Correction, I don't want a trigger for switching between the 2, I want to
run a function when I switch between a schematic and layout.
Is there a trigger for switching between a schematic and a layout
window and vice versa?
thanks,
Dominic DuVarney
Hi Andrew,
Basically, I have 2 windows side by side. One is a schematic and one is
a layout. I have a form that is created in a window that I use for a
fixed menu. I have a function that will dynamically change the entries
based on what tool I am using (layout or schematic). I would like to
detect when I switch windows(when there is a tool change) and
automatically update the menu.
thanks for the help
Dominic
Dominic Duvarney wrote:
Is there a trigger for switching between a schematic and a layout
window and vice versa?
thanks,
Dominic DuVarney
Hi, this is a small example, based on a window popup menu,
you can place dynamic created entries in the item and callback
lists as well, should also work with fixed menus.
But I wouldn't say that is is a trigger, it just detects
what type is the current edited cellview and switches entries based on
that.
Hope this helps,
Bernd
procedure( BFraiseWindowsPopUp( )
let( ( l_itemList l_callBackList )
cond(
( geGetEditCellView()~>cellViewType == "schematic"
l_itemList = list( "Schematic" )
l_callBackList = list(
"printf( \"The application is the schematic editor\n\" )" )
)
( geGetEditCellView()~>cellViewType == "maskLayout"
l_itemList = list( "Layout" )
l_callBackList = list(
"printf( \"The application is the layout editor\n\" )" )
)
) ;; close cond
hiDisplayMenu(
hiCreateSimpleMenu(
'BFpopUpMenu
"Application"
l_itemList
l_callBackList
) ;; close hiCreateSimpleMenu
) ;; close hiDisplayMenu
) ;; close let
) ;; close BFraiseWindowsPopUp
;; building the bindkeys for all usefull applications
let( ( l_applicationList )
l_applicationList = list(
"Layout"
"Schematics"
)
foreach( t_application l_applicationList
hiSetBindKey( t_application "<Key>F8" "BFraiseWindowsPopUp( )" )
) ;; close foreach
) ;; close let
Dominic DuVarney wrote:
Hi Andrew,
Basically, I have 2 windows side by side. One is a schematic and one
is a layout. I have a form that is created in a window that I use for
a fixed menu. I have a function that will dynamically change the
entries based on what tool I am using (layout or schematic). I would
like to detect when I switch windows(when there is a tool change) and
automatically update the menu.
thanks for the help
Dominic
Dominic Duvarney wrote:
Is there a trigger for switching between a schematic and a layout
window and vice versa?
thanks,
Dominic DuVarney
.... this is a 'window manager' task.just by making the window with the different tool active.
Bernd is right. There's no trigger (at least at the SKILL level) that getsjust by making the window with the different tool active.
... this is a 'window manager' task.
A SKILL trigger needs somehow an event, opening a window or launching
an application.
Honestly I think what you want do is not possible that way.
Bernd
On Thu, 09 Feb 2006 16:15:50 +0100, Bernd Fischer
""bernd.fischer\"@xignal-A%&HY%$v#&G=.de"> wrote:
just by making the window with the different tool active.
... this is a 'window manager' task.
A SKILL trigger needs somehow an event, opening a window or launching
an application.
Honestly I think what you want do is not possible that way.
Bernd
Bernd is right. There's no trigger (at least at the SKILL level) that gets
invoked upon a window being current.
It writes hiSetCurrentWindow(window(num)) into the CDS.log file - but it didn't
actually call hiSetCurrentWindow - not that this would help, since you can't
intercept it - this is so that replaying of the log file works.
I did find a PCR asking for this:
PCR: 409445
Title: How to register current window change trigger ?
Which does have a workaround within it - not exactly a nice way of doing it, but
better than nothing:
MyCurWindow = 0
procedure( MyCheckCurWindowCB( )
let( (newCurWindow)
newCurWindow = hiGetCurrentWindow()
when( newCurWindow && newCurWindow != MyCurWindow
printf( "Old current window = %d, new current window = %d\n"
MyCurWindow newCurWindow )
MyCurWindow = newCurWindow
)
hiRegTimer( "MyCheckCurWindowCB()" 5 )
)
)
MyCheckCurWindowCB()
(Thanks to Pete Zakel for the workaround code).
Obviously you should minimise the amount of code that is being invoked every
half second (which is what the above does) .
Regards,
Andrew.
Hi Dominic,Thanks Andrew,
That's actually how I am currently doing it, but am concerned
about long term drain on system resources. The code below works
but it just seems sloppy. This is code I want let cicuit and layout
designers use but doing a repetitive check isn't something I would
feel comfortable with without knowing potential side effects.
procedure(checkVT()
when(hiGetCurrentWindow()
unless(boundp('lastVT) lastVT = "maskLayout")
unless( deGetViewType() == lastVT
lastVT = deGetEditViewType()
when(boundp('myFixedMenu) && hiIsFormDisplayed(myFixedMenu)
when(lastVT == "maskLayout" updateMyFixedMenu(?tool "layout"))
when(lastVT == "schematic" undateMyFixedMenu(?tool "schematic"))
)
)
)
hiRegTimer("checkVT()" 30)
)
Once again, thanks for your help Andrew.
Actually, hiRegCurWindowTrigger() was added in IC 5.2.51, so it will beOn Thu, 09 Feb 2006 16:15:50 +0100, Bernd Fischer
""bernd.fischer\"@xignal-A%&HY%$v#&G=.de"> wrote:
just by making the window with the different tool active.
... this is a 'window manager' task.
A SKILL trigger needs somehow an event, opening a window or launching
an application.
Honestly I think what you want do is not possible that way.
Bernd is right. There's no trigger (at least at the SKILL level) that gets
invoked upon a window being current.
In article <ocsmu1pj8rn17iur2hockqlppuckokpfv6@4ax.com> Andrew Beckett <andrewb@DcEaLdEeTnEcTe.HcIoSm> writes:
On Thu, 09 Feb 2006 16:15:50 +0100, Bernd Fischer
""bernd.fischer\"@xignal-A%&HY%$v#&G=.de"> wrote:
just by making the window with the different tool active.
... this is a 'window manager' task.
A SKILL trigger needs somehow an event, opening a window or launching
an application.
Honestly I think what you want do is not possible that way.
Bernd is right. There's no trigger (at least at the SKILL level) that gets
invoked upon a window being current.
Actually, hiRegCurWindowTrigger() was added in IC 5.2.51, so it will be
available in newer releases.
Until then, the workaround Andrew posted should work.
-Pete Zakel
(phz@seeheader.nospam)
There is one fault that I must find
With the twentieth century,
And I'll put it in a couple of words:
Too adventury.
What I'd like would be some nice dull monotony
If anyone's gotony.
- Ogden Nash