Guest User

Gio PEt

a guest
Jun 29th, 2010
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {Set Active Layer_Tool to set as Active the Layer of the selected object.
  2. Copyright (C) 2010  Giovanni Petrolito}
  3.  
  4. PROCEDURE SetObjectLayer;
  5. VAR
  6.     h,g : HANDLE;
  7.     Active_Layer : STRING;
  8.    x, y :REAL;
  9.  
  10. BEGIN
  11.    
  12.  
  13.     GetPt(x, y);
  14.    h := PickObject(x, y);
  15.  
  16.     g := GetLayer(h);
  17.        
  18.         IF h<>NIL THEN BEGIN
  19.  
  20.         Active_Layer:= GetLName(g);
  21.    
  22.         LAyer(Active_Layer);
  23.         SetTool(-240);
  24.     END;
  25.    
  26. END;
  27. Run(SetObjectLayer);
  28.  
  29.  
  30.  
  31.  
  32. {This program is free software: you can redistribute it and/or modify
  33.     it under the terms of the GNU General Public License as published by
  34.     the Free Software Foundation, either version 3 of the License, or
  35.     (at your option) any later version.
  36.  
  37.     This program is distributed in the hope that it will be useful,
  38.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  39.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  40.     GNU General Public License for more details.
  41.  
  42.     You should have received a copy of the GNU General Public License
  43.     along with this program.  If not, see <http://www.gnu.org/licenses/>.}
RAW Paste Data