Jump to content

lcda

Member
  • Posts

    85
  • Joined

  • Last visited

Posts posted by lcda

  1. Ok I think the correct way for these 2 scripts are this:

    Layer to screen

     

    PROCEDURE LayerToScreen;
    
    PROCEDURE Execute(h:HANDLE);
    
    	BEGIN
    		SetObjectVariableBoolean(h,1160,TRUE);
    	END;
    
    BEGIN
    	SetPref(6839,TRUE);
    	ForEachObject(Execute,ALL);
    END;
    
    Run(LayerToScreen);


    Screen to layer

     

    PROCEDURE ScreenToLayer;
    
    PROCEDURE Execute(h:HANDLE);
    
    	BEGIN
    		SetObjectVariableBoolean(h,1160,FALSE);
    	END;
    
    BEGIN
    
    	ForEachObject(Execute, (PLA='Screen Plane') & (ALL));
    
    END;
    
    Run(ScreenToLayer);

     

  2. Or maybe we can make an option to select the layers you want to change as you do on text option

    this script is not working well it only changes the objects on actual layer, how can I do to change all objects??

     

    PROCEDURE ScreenToLayer;
    
    PROCEDURE Execute(h:HANDLE);
    
    	BEGIN
    		SetObjectVariableBoolean(h,1160,FALSE);
    	END;
    
    BEGIN
    	ForEachObject(Execute,(PLA='Screen Plane'));
    END;
    
    Run(ScreenToLayer);

     

  3. Thanks a lot!!!

    I have been testing this script and works perfectly but the only problem is that changes things in viewports so I deleted the viewports option but it still does, is there a way this to operate only in design layers

     

    Procedure UseClassAttribs;
    
    Procedure Execute(Hd1:Handle);
    	BEGIN
    
    	SetFillColorByClass(Hd1);
    	SetPenColorByClass(Hd1);
    	SetFPatByClass(Hd1);
    	SetLWByClass(Hd1);
    	SetLSByClass(Hd1);
    	SetOpacityByClass(Hd1);
    	
    	End;
    	
    BEGIN
    	ForEachObject(Execute, (INOBJECT & (ALL)));
    End;
    
    Run(UseClassAttribs);



     

  4. I think the layer to screen is working well this way

     

    PROCEDURE LayerToScreen;
    
    PROCEDURE Execute(h:HANDLE);
    
    	BEGIN
    		SetObjectVariableBoolean(h,1160,TRUE);
    	END;
    
    BEGIN
    	SetPref(6839,TRUE);
    	ForEachObject(Execute,(PLA='Layer Plane'));
    END;
    
    Run(LayerToScreen);

     

  5. ok I think it's working now I just need the instruction to change layer plane and render texture by class

     

    Procedure UseClassAttribs;
    
    Procedure Execute(Hd1:Handle);
    	BEGIN
    
    	SetFillColorByClass(Hd1);
    	SetPenColorByClass(Hd1);
    	SetFPatByClass(Hd1);
    	SetLWByClass(Hd1);
    	SetLSByClass(Hd1);
    	SetOpacityByClass(Hd1);
    	
    	End;
    	
    BEGIN
    	ForEachObject(Execute, (INSYMBOL & INOBJECT & INVIEWPORT & (ALL)));
    End;
    
    Run(UseClassAttribs);

     

  6. {///////////////////////////////////////////
    UseClassAttribs
    (c) 2001 Nemetschek North America. Distribute freely.
    
    Shows how to set object to use display attributes of assigned class.
    
    ///////////////////////////////////////////}
    
    
    PROCEDURE UseClassAttribs;
    VAR
    	h : HANDLE;
    
    BEGIN
    	{ get a handle to the object }
    
    	h:= FSActLayer;
    
    	{ set the object to use the class settings for }
    	{ its display attributes.                      }
    
    	SetFillColorByClass(h);
    	SetPenColorByClass(h);
    	SetFPatByClass(h);
    	SetLWByClass(h);
    	SetLSByClass(h);
    END;
    Run(UseClassAttribs);

      I made this script years ago a thin in 2016 version but I wish it could be for all objects and also render by class

  7. I update and old script from VW 2016 to VW2012 that used to be a toggle for hide palettes and now sends me this error:

    DoMenuTextByName('Standard Palettes Chunk', 6); { obj browser }

    this script still works all palettes except navigation and info

    how can I update this thanks

    DoMenuTextByName('Tool Palettes', 1);
    DoMenuTextByName('Tool Palettes', 2);
    DoMenuTextByName('Tool Palettes', 3);
    DoMenuTextByName('Tool Palettes', 4);
    DoMenuTextByName('Tool Palettes', 5);
    DoMenuTextByName('Tool Palettes', 6);
    DoMenuTextByName('Tool Palettes', 7);
    DoMenuTextByName('Tool Palettes', 8);
    DoMenuTextByName('Tool Palettes', 9);
    DoMenuTextByName('Tool Palettes', 10);
    DoMenuTextByName('Standard Palettes Chunk',1); { constraints }

    DoMenuTextByName('Standard Palettes Chunk', 2); { attributes }

    DoMenuTextByName('Standard Palettes Chunk', 3); { obj info }

    DoMenuTextByName('Standard Palettes Chunk', 4); { working planes }

    DoMenuTextByName('Standard Palettes Chunk', 5); { resources }

    DoMenuTextByName('Standard Palettes Chunk', 6); { obj browser }

    DoMenuTextByName('Standard Palettes Chunk', 6); { obj browser }

×
×
  • Create New...