Advertisement
Guest User

Gio PEt

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