V
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)")
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)")