Page 1 of 1

switch on/off layer by code

Posted: 20 Jun 2007, 10:47
by alfons
Hallo,
how can i switch layers on/off by code using Delphi 7 ?

Posted: 21 Jun 2007, 10:33
by support
Hello!

Demo <b>Delphi</b> contains <b>unit</b> fLayers, where managing with layers is released. Calling <b>Layers</b> dialog is implemented by <b>btnLayers</b> SpeedButton. Please find in the demo the following lines:

Code: Select all

<b>procedure</b> TfmMain.btnLayersClick(Sender: TObject);
<b>begin
  if</b> FCADViewX.DXFImage <> <b>nil then
  begin</b>
    LayersDialogExecute(DXFImageSrv.DefaultInterface, FCADViewX);
    FCADViewX.RefreshAfterRotate;
  <b>end</b>;
<b>end</b>;
Demo <b>Delphi</b> is available in the ..\CADViewX\Demos\Delphi\.. folder after installation of <b>CADViewX Component</b> package.

Sergey.


Please post questions to the forum or write to support@cadsofttools.com

Posted: 21 Jun 2007, 12:14
by alfons
Thanks for fast reply.