Best method to turn on/off DXF files as layers?
Posted: 19 Apr 2011, 16:58
I'm a beginner on CADImport fields. So I need a little help.
I have to load multiple DXF files and show them in a common picture.
These separated files are contains different layers from our map. (Example: roads, traffic signals, plants etc.)
I'd like to turn on/off these layers afther they are loaded.
I have found an example (see below) which is always drawing all the loaded DXF files from the first until the last. It means the zoom level and rotation on the common picture is always resetting afther redrawing (loading new file).
Which is the best method, to create turn on/off functionality to different DXF files?
CADImage img1;
if(filesToMerge.Count > 0)
{
for(int i = 0; i < filesToMerge.Count; i++)
{
FileRecord f1 = (FileRecord)filesToMerge;
img1 = CreateCADImage(f1);
image.AddScaledDXF(img1, f1.FileName, f1.Position, f1.Scale, (float)f1.Rotation);
image.UseDoubleBuffering = false;
this.OnResize();
}
Image.GetExtents();
}
I have to load multiple DXF files and show them in a common picture.
These separated files are contains different layers from our map. (Example: roads, traffic signals, plants etc.)
I'd like to turn on/off these layers afther they are loaded.
I have found an example (see below) which is always drawing all the loaded DXF files from the first until the last. It means the zoom level and rotation on the common picture is always resetting afther redrawing (loading new file).
Which is the best method, to create turn on/off functionality to different DXF files?
CADImage img1;
if(filesToMerge.Count > 0)
{
for(int i = 0; i < filesToMerge.Count; i++)
{
FileRecord f1 = (FileRecord)filesToMerge;
img1 = CreateCADImage(f1);
image.AddScaledDXF(img1, f1.FileName, f1.Position, f1.Scale, (float)f1.Rotation);
image.UseDoubleBuffering = false;
this.OnResize();
}
Image.GetExtents();
}