Set Bindkey

  • Thread starter sridhartv25@gmail.com
  • Start date
S

sridhartv25@gmail.com

Guest
Hello all,

I can set a bindkey for the multipartpath function by simply,

hiSetBindKey("Layout" "<Key>n" "leHiCreateMPP()")

But how can I put a bindkey for pdiff_ring which is a template in the
in the multipartpath fucnction.

Create -> Multipartpath -> MPP Template -> pdiff_ring.

Thanks in advance,

Cheers,
Sridhar.
 
On Feb 16, 6:40 am, "sridhart...@gmail.com" <sridhart...@gmail.com>
wrote:
Hello all,

      I can set a bindkey for the multipartpath function by simply,

hiSetBindKey("Layout" "<Key>n" "leHiCreateMPP()")

But how can I put a bindkey for pdiff_ring which is a template in the
in the multipartpath fucnction.

Create -> Multipartpath -> MPP Template -> pdiff_ring.

Thanks in advance,

Cheers,
Sridhar.
Something like this should work:

hiSetBindKey("Layout" "Ctrl<Key>n" "leRodMppForm->rodMPPTemplate-
value=\"pdiff_ring\"")
Assuming the multipart path form i.e. leRodMppForm has been mapped.
 
sridhartv25@gmail.com wrote, on 02/16/09 11:40:
Hello all,

I can set a bindkey for the multipartpath function by simply,

hiSetBindKey("Layout" "<Key>n" "leHiCreateMPP()")

But how can I put a bindkey for pdiff_ring which is a template in the
in the multipartpath fucnction.

Create -> Multipartpath -> MPP Template -> pdiff_ring.

Thanks in advance,

Cheers,
Sridhar.
A bindkey like this should work:

hiSetBindKey("Layout" "<Key>n"
"leSetEnv(\"mppTemplate\" \"pdiff_ring\") leHiCreateMPP()")

Regards,

Andrew.
 
Hello Andrew,

Thanks alot , its working. Always its used to be a time consuming
process in selecting the option from the multipart path form.

Thanks eyn for your reply,
When I press the bindkey its return value is
leRodMppForm->rodMPPTemplate->value="pdiff_ring"
But its not working, what could be the problem.

Cheers,
Sridhar.
 
sridhartv25@gmail.com wrote, on 02/18/09 04:30:
Hello Andrew,

Thanks alot , its working. Always its used to be a time consuming
process in selecting the option from the multipart path form.

Thanks eyn for your reply,
When I press the bindkey its return value is
leRodMppForm->rodMPPTemplate->value="pdiff_ring"
But its not working, what could be the problem.

Cheers,
Sridhar.
Sridhar,

The reason that Eyn's reply is not working is probably because the mppTemplate
will override the direct setting of the form value, unless the create MultiPart
Path form has already been launched.

So the right way to do this is to use the mppTemplate approach that I suggested.

Regards,

Andrew.
 
sridhartv25@gmail.com wrote, on 02/20/09 06:28:
Hi Andrew,
In the similar way how can I set bindkey to open the multipartpath
form.
This doesnot seems to work,
hiSetBindKey("Layout" "ctrl<key>n" "leHiCreateMPP()->hiToggleEnterForm
()")
Cheers,
Sridhar.
How about:

procedure(ABleHiCreateMPP()
let((ciw expertMode)
ciw=hiGetCIWindow()
expertMode=ciw~>expertMode
ciw~>expertMode=nil
leHiCreateMPP()
ciw~>expertMode=expertMode
)
)

This temporarily turns off "expert mode" (which is the same as the Options->User
Preferences setting "Options Displayed When Command Start" - or rather the
inverse of that) - so that the options form gets automatically displayed at the
end. The stuff around it is to make sure it restores the expertMode to what it
was originally.

Andrew.
 
Hi Andrew,
In the similar way how can I set bindkey to open the multipartpath
form.
This doesnot seems to work,
hiSetBindKey("Layout" "ctrl<key>n" "leHiCreateMPP()->hiToggleEnterForm
()")
Cheers,
Sridhar.
 
Nice idea Andrew,
But how can we do it directly Andrew.
Cheers,
Sridhar.
 
sridhartv25@gmail.com wrote, on 02/20/09 08:01:
Nice idea Andrew,
But how can we do it directly Andrew.
Cheers,
Sridhar.
What do you mean? That does it directly, doesn't it? That's the clean, non-hacky
way of doing it.

If you want another way, you can do:

hiSetBindKey("Layout" "<Key>n"
"hiRegTimer(\"hiToggleEnterForm()\" 0) leHiCreateMPP()"
)

Personally I don't like that as much - for a start, it will have the opposite
behaviour if you turn on the "Show Options form when command starts" button in
the User Preferences...

Regards,

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top