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.
You can direct change the layer attributes of selected object.
obj_id = car(geGetSelSet())
obj_id~>purpose = "B5"
In reply to kbhow:
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.
In reply to vincentmt:
To change the layer and layer purpose at the same time, u can do this.
obj_id~>lpps = list("M2" "net")
i try your advice, but it's didn't show any changes.
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.
And to change the layer and purpose,
obj_id~>lpp = list("M2" "drawing")
Your coding should not working cause it is not proper constructed. You may try this.
procedure( changePurpose( @optional (purpose "drawing"))
selset = geGetSelSet()
foreach( sel selset
sel~>lpps = list(sel~>layerName purpose)
;; Set bindkeys
hiSetBindKey( "Layout" "<Key>F1" "changePurpose()") ;by default, it will change to drawing
hiSetBindkKey("Layout" Shift<Key>F1" "changePurpose("pin")")
You don't really need to do the foreach. You can just do:
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)
In reply to Andrew Beckett:
Thanks Adrew for the good catch. =D
thanks andrew and how for the help. :)
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.
IC6 does not permit assigning bindkeys with the Alt modifier - by default. You can change that with this .cdsenv setting:
ui enableMenuShortcuts boolean nil