Home > Community > Forums > Custom IC SKILL > Skill code to toggle EIP (Edit in place)

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Skill code to toggle EIP (Edit in place) 

Last post Tue, Sep 22 2009 12:58 PM by zeroskills. 10 replies.
Started by zeroskills 22 Sep 2009 11:43 AM. Topic has 10 replies and 2929 views
Page 1 of 1 (11 items)
Sort Posts:
  • Tue, Sep 22 2009 11:43 AM

    Skill code to toggle EIP (Edit in place) Reply

    Hi All,

    I always use EIP (edit in place) and would like to have a toggle to turn it off and on, could you help me with a skill code. I would like to assign it to a bindkey - "alt+x". pressing "alt+x" will turn on or off EIP.

     

    Thanks. 

    • Post Points: 50
  • Tue, Sep 22 2009 11:48 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: Skill code to toggle EIP (Edit in place) Reply

    I'm assuming you are talking about the EIP surround option on the Display Options form. If so, then this is all you need:

    procedure(toggleEipSurround()
        let(((win hiGetCurrentWindow()))
           if(win->drawSurroundingOn
                win->drawSurroundingOn=nil
                win->drawSurroundingOn=t
           )
        ) ;let
    ) ;proc

    • Post Points: 35
  • Tue, Sep 22 2009 11:53 AM

    Re: Skill code to toggle EIP (Edit in place) Reply

    That was quick. was it a default skill code or it was just that easy?

    Anyway, Thanks for help. 

    • Post Points: 20
  • Tue, Sep 22 2009 11:55 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,571
    • Points 15,610
    Re: Skill code to toggle EIP (Edit in place) Reply

    Hi,

    I will add to what Derek said.  If you are talking about the default "x" bindkey which performs Edit-In-Place, then the default Shift-B bindkey should perform a return operation.

    Regards,

    Lawrence.

    • Post Points: 20
  • Tue, Sep 22 2009 11:59 AM

    Re: Skill code to toggle EIP (Edit in place) Reply
    Hi zeroskills,

    What does "turning EIP on or off" mean? Edit in Place is an action you take - you edit in place, select a location, and it descends to that point. I don't see that there's anything to turn on or off?

    Perhaps you mean toggling the display of the EIP surround? (As on the Options->Display form). If so, the trick would be to look at:

    hiGetCurrentWindow()~>?

    Figure out the relevant property name (I can't check because I'm sending this from a PDA in an airport), and then your bindkey would be:

    hiGetCurrentWindow()~>thePropName=!hiGetCurrentWindow()~>thePropName

    Where "thePropName" is whatever it is called.

    But of course this is guesswork - you may be asking a different question!

    Regards,

    Andrew
    • Post Points: 5
  • Tue, Sep 22 2009 12:02 PM

    Re: Skill code to toggle EIP (Edit in place) Reply
    Thanks to Derek for identifying the property name (my previous reply explained how to figure it out yourself).

    That said, defining a function is overkill for this, as:

    hiGetCurrentWindow()~>drawSurroundingOn=!hiGetCurrentWindow()~>drawSurroundingOn

    Would be sufficient.

    Andrew
    • Post Points: 5
  • Tue, Sep 22 2009 12:02 PM

    Re: Skill code to toggle EIP (Edit in place) Reply

    Derek's code is all i need, just toggling EIP from on to off and vice versa. i had a similar one but the if statement is a hit and miss, and there's a condition to satisfy like if M0 drawing is present, do the EIP - off else -on.

    But the code above is fine.

    Thanks for the help.

    • Post Points: 5
  • Tue, Sep 22 2009 12:03 PM

    Re: Skill code to toggle EIP (Edit in place) Reply
    What do you mean by "default SKILL code?"

    Andrew
    • Post Points: 20
  • Tue, Sep 22 2009 12:12 PM

    Re: Skill code to toggle EIP (Edit in place) Reply

    Hi Andrew ,

    is  this what you meant?

     

    procedure(drawSurroundingOn()

    hiGetCurrentWindow()~>drawSurroundingOn=!hiGetCurrentWindow()~>drawSurroundingOn


    ) ;proc

    hiSetBindKey( "Layout" "Alt<Key>c" "drawSurroundingOn()")
     
    i thought there's a default skill code for toggling edit in place (eip). my current skill code wasn't working properly so i have to do it in the display option's window (e)

    • Post Points: 20
  • Tue, Sep 22 2009 12:28 PM

    Re: Skill code to toggle EIP (Edit in place) Reply
    Sort of, but you don't really need to define the procedure. Just doing this would be enough:

    hiSetBindKey( "Layout" "Alt<Key>c" "hiGetCurrentWindow()~>drawSurroundingOn=!hiGetCurrentWindow()~>drawSurroundingOn")

    There's no built in function to do this toggling (if that's what you meant by "default") because it's such a simple expression to do it.

    Regards,

    Andrew
    • Post Points: 20
  • Tue, Sep 22 2009 12:58 PM

    Re: Skill code to toggle EIP (Edit in place) Reply

    I guess you're right, since i had a skill code for it so there wasn't a really a default one in the first place. i was just checking in case there was and didn't even knew it.

    Thanks for all you're codes and helping me again.

    • Post Points: 5
Page 1 of 1 (11 items)
Sort Posts:
Started by zeroskills at 22 Sep 2009 11:43 AM. Topic has 10 replies.