lock layout shape from being move/stretch/delete

Discussion in 'Cadence' started by vtcad, Nov 14, 2007.

  1. vtcad

    vtcad Guest

    I am looking for a way to lock selected shapes from being move/
    stretched/deleted all the time. I've got a peice of code that kinda
    works, but only when shapes are selected prior to entering the move/
    stretched/delete command. If I start the command then select the shape
    it will move them currently,.



    (defun mitDoWithLock (func)
    (foreach fig (geGetSelectedSet)
    (when fig~>lockDown == "TRUE"
    (geDeselectFig fig)))
    (when t
    (funcall func)));end defun


    (defun mitLockDownInstance ()
    (foreach fig (geGetSelectedSet)
    (dbReplaceProp fig "lockDown" "boolean" t))
    (printf "Locked down %d instances\n" (length
    (geGetSelectedSet))));end defun


    (defun mitUnLockDownInstance ()
    (foreach fig (geGetSelectedSet)
    (dbReplaceProp fig "lockDown" "boolean" nil))
    (printf "Unlocked %d instances\n" (length (geGetSelectedSet))));end
    defun


    (hiSetBindKey "Layout" "<Key>s" "(mitDoWithLock 'leHiStretch)")

    (hiSetBindKey "Layout" "<Key>m" "(mitDoWithLock 'leHiMove)")

    (hiSetBindKey "Layout" "<Key>Delete" "(mitDoWithLock 'leHiDelete)")

    (hiSetBindKey "Layout" "Ctrl<Key>l" "(mitLockDownInstance)")

    (hiSetBindKey "Layout" "Ctrl<Key>u" "(mitUnLockDownInstance)")
     
    vtcad, Nov 14, 2007
    #1

  2. I've seen this done by changing the mouse bindkeys so that they don't select
    anything that's marked as locked, rather than changing the move bindkeys.

    Another approach is to use VirtuosoXL - you can add a constraint to an object to
    indicate that it's in a fixed location (I forget the precise name for this
    constraint in IC5141 or IC61). You have to enable constraint aware editing in
    the VirtuosoXL options form to prevent it moving though...

    Regards,

    Andrew.
     
    Andrew Beckett, Nov 15, 2007
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.