private void ToggleDrawing_Click(object sender, RoutedEventArgs e) { var layer = EyeshotModel.Layers["DWG"]; if (layer.Visible) { layer.Visible = false; ToggleDrawing.Content = "Show Drawing"; EyeshotModel.Invalidate(); } else { layer.Visible = true; ToggleDrawing.Content = "Hide Drawing"; EyeshotModel.Invalidate(); } }
protected override void OnContentRendered(EventArgs e) { var fileName = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments), @"Eyeshot Professional 2020 Samples\dataset\Assets\Misc\app8.dwg"); EyeshotModel.Layers.Add("DWG"); var ra = new ReadAutodesk(fileName); ra.DoWork(); ra.AddToSceneAsSingleObject(EyeshotModel, "DWG", "DWG"); min = Point2D.Origin; max = new Point2D(217478, 137969); for (int index = 0; index < 100; index++) { CreateVehicle(index); } EyeshotModel.ZoomFit(); EyeshotModel.Invalidate(); base.OnContentRendered(e); }