Home > Community > Forums > Custom IC SKILL > change selected layer

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: *

 change selected layer 

Last post Sun, Dec 13 2009 7:46 PM by TrevorB. 13 replies.
Started by vincentmt 09 Jul 2009 01:44 AM. Topic has 13 replies and 4620 views
Page 1 of 1 (14 items)
Sort Posts:
  • Thu, Jul 9 2009 1:44 AM

    • vincentmt
    • Not Ranked
    • Joined on Tue, Jun 2 2009
    • Posts 9
    • Points 180
    change selected layer Reply

    if i wish to change a selected layer from one data type to another data type, what i should type in CIW ? (without using leHiEditProp())

    etc i want to change M1 "drawing" to M1 "B5" on a selected rect/ poligon.

    • Post Points: 35
  • Thu, Jul 9 2009 1:50 AM

    Re: change selected layer Reply
    Assuming all the selected shapes are on the same layer (or you don't mind
    changing other things too - in other words, with no sanity checking), it's just:

    geGetSelSet()~>purpose="B5"

    Regards,

    Andrew.
    • Post Points: 5
  • Thu, Jul 9 2009 1:51 AM

    • kbhow
    • Top 75 Contributor
    • Joined on Thu, May 7 2009
    • Penang, Pulau Pinang
    • Posts 120
    • Points 2,045
    Re: change selected layer Reply

    Hi vincent,

     You can direct change the layer attributes of selected object.

    obj_id = car(geGetSelSet())

    obj_id~>purpose = "B5"

    • Post Points: 20
  • Thu, Jul 9 2009 2:08 AM

    • vincentmt
    • Not Ranked
    • Joined on Tue, Jun 2 2009
    • Posts 9
    • Points 180
    Re: change selected layer Reply

    Thanks andrew and kbhow.

    so how about if i want to change the layer and the purpose at the same time? is it posible to do it? i have try out, i can't make it if want to do this two action at the same time.

    • Post Points: 20
  • Thu, Jul 9 2009 2:29 AM

    • kbhow
    • Top 75 Contributor
    • Joined on Thu, May 7 2009
    • Penang, Pulau Pinang
    • Posts 120
    • Points 2,045
    Re: change selected layer Reply

    Hi Vincent,

     To change the layer and layer purpose at the same time, u can do this.

    obj_id~>lpps = list("M2" "net")

     

    How

    • Post Points: 20
  • Thu, Jul 9 2009 2:35 AM

    • vincentmt
    • Not Ranked
    • Joined on Tue, Jun 2 2009
    • Posts 9
    • Points 180
    Re: change selected layer Reply

    hi kbhow,

    i try your advice, but it's didn't show any changes.

    • Post Points: 20
  • Thu, Jul 9 2009 2:42 AM

    • kbhow
    • Top 75 Contributor
    • Joined on Thu, May 7 2009
    • Penang, Pulau Pinang
    • Posts 120
    • Points 2,045
    Re: change selected layer Reply

    Hi Vincent,

    It is my typo... the layer and purpose can be change easily by changing the object's lpp

    FYI, you can view all the info of the object by using the tail operator. 

    obj_id~>??

     

    And to change the layer and purpose,

    obj_id~>lpp = list("M2" "drawing")

    will helps

     

    How

    • Post Points: 5
  • Mon, Jul 13 2009 8:18 PM

    • kbhow
    • Top 75 Contributor
    • Joined on Thu, May 7 2009
    • Penang, Pulau Pinang
    • Posts 120
    • Points 2,045
    Re: change selected layer Reply

    Hi Vincent,

    Your coding should not working cause it is not proper constructed. You may try this.

     

    procedure( changePurpose( @optional (purpose "drawing"))

        let((selset)

            selset = geGetSelSet()

            foreach( sel selset

                    sel~>lpps = list(sel~>layerName purpose)

            );foreach

        );let

    );proc

     

    ;; Set bindkeys

    hiSetBindKey( "Layout" "<Key>F1" "changePurpose()")      ;by default, it will change to drawing

    hiSetBindkKey("Layout" Shift<Key>F1" "changePurpose("pin")")

    • Post Points: 35
  • Tue, Jul 14 2009 1:31 AM

    Re: change selected layer Reply

    You don't really need to do the foreach. You can just do:

      geGetSelSet()~>lpp='("newLayer" "newPurpose")

    or:

      geGetSelSet()~>purpose="newPurpose"

    if you just want to change the purpose.

    How's code won't work because it uses sel~>lpps inside the foreach, and it should be sel~>lpp (the attribute is called lpp, not lpps)

    Regards,

    Andrew.

    • Post Points: 20
  • Tue, Jul 14 2009 1:36 AM

    • kbhow
    • Top 75 Contributor
    • Joined on Thu, May 7 2009
    • Penang, Pulau Pinang
    • Posts 120
    • Points 2,045
    Re: change selected layer Reply

    Thanks Adrew for the good catch. =D

     

    • Post Points: 20
  • Tue, Jul 14 2009 6:14 PM

    • vincentmt
    • Not Ranked
    • Joined on Tue, Jun 2 2009
    • Posts 9
    • Points 180
    Re: change selected layer Reply

    thanks andrew and how for the help. :)

    • Post Points: 5
  • Sun, Dec 13 2009 12:46 AM

    • vincentmt
    • Not Ranked
    • Joined on Tue, Jun 2 2009
    • Posts 9
    • Points 180
    Re: change selected layer Reply
    Hi how,
    i'm try to setting some bindkey in the the key pad(num lock) it's doesn't work.
     
    " bindkey ("Layout" "Meta<Key>KP_Ins"    "ChangeLayerAttr(?layer \"M10\")")
     
    it will promt me
    "*WARNING* Modifier Alt is unassigned, illegal or disabled.
    *WARNING* Unrecognized key encryption: Alt<Key>KP_0.
    *WARNING* Modifier Alt is unassigned, illegal or disabled.
    *WARNING* Unrecognized key encryption: Alt<Key>KP_0."
     
    i'm can't find why.
    if me setting " bindkey ("Layout" "Ctrl<Key>KP_Ins"    "ChangeLayerAttr(?layer \"M10\")")"
    error message is
    *WARNING* (LE-104018): Setting the entry layer to be invisible
     
    but if i'm setting other then "Ins--"0" it's work for "Ctrl" but not for "Meta (Alt)" is it we can't setting the "Meta" bindkey for key pad keys?
     
    and how i'm going to set bindkey on the "Ins--0" key??
     
    please advice. Thanks in advace
     
    KK.
    • Post Points: 35
  • Sun, Dec 13 2009 7:15 PM

    • kbhow
    • Top 75 Contributor
    • Joined on Thu, May 7 2009
    • Penang, Pulau Pinang
    • Posts 120
    • Points 2,045
    Re: change selected layer Reply

    Hi KK,

    I not sure why but as i know, you can't set binkeys for "Alt" key. You find enrecognized key encription for "Alt" key. Try to use "Shift" of "Ctrl", it should works.

    Since you didn't attach any coding for function ChangeLayerAttr, i assume this function is changing the layer attribute to invisible. Before changing the layer attribute to invisible, please make sure that the layer that you going to change is not entry layer. You can't change entry layer to be invisible.

    How

    • Post Points: 5
  • Sun, Dec 13 2009 7:46 PM

    • TrevorB
    • Not Ranked
    • Joined on Mon, Nov 30 2009
    • Huntsville, AL
    • Posts 14
    • Points 250
    Re: change selected layer Reply

     IC6 does not permit assigning bindkeys with the Alt modifier - by default.  You can change that with this .cdsenv setting:

    ui                      enableMenuShortcuts             boolean         nil
    Filed under: , ,
    • Post Points: 5
Page 1 of 1 (14 items)
Sort Posts:
Started by vincentmt at 09 Jul 2009 01:44 AM. Topic has 13 replies.