public static void Main() { var log = LoggerFactory.GetLogger(); log.Info("Examples are just about to start."); QuickStart.Start(); BasicModelOperationsExample.Create(); BasicModelOperationsExample.Retrieve(); BasicModelOperationsExample.Update(); BasicModelOperationsExample.Delete(); log.Warn("Always use LINQ instead of general iterations!"); LinqExample.SelectionWithLinq(); LinqExample.SelectionWithoutLinq(); LinqExample.SelectionWithLinqLanguage(); log.Error("This is how the error would be logged with log4net."); FederationExample.CreateFederation(); ChangeLogExample.CreateLog(); StepToXmlExample.Convert(); log.Info("All examples finished."); }
public static void Main() { string path = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName; string fileName = path + "//test.ifc"; //this can be either IFC2x3 or IFC4 QuickStart start = new QuickStart(fileName); { //get all doors in the model (using IFC4 interface of IfcDoor this will work both for IFC2x3 and IFC4) //var allDoors = model.Instances.OfType<IIfcProduct>(); //foreach(var door in allDoors) //{ // Entity tmp = start.getBasicInfo(door, model); // string json = JsonConvert.SerializeObject(tmp); // Console.WriteLine(json); //} //get only doors with defined IIfcTypeObject //get one single door var id = "1Oms875aH3Wg$9l65H2ZGw"; var theDoor = start.getDoorById(id); string json = JsonConvert.SerializeObject(start.getBasicInfo(theDoor)); Console.WriteLine(json); Console.ReadKey(); } }
public static void Main() { // set up Serilog or any other provider which imlements Microsoft.Extensions.Logging.ILogger Log.Logger = new LoggerConfiguration() .Enrich.FromLogContext() .WriteTo.Console() .CreateLogger(); // set up binding to MS Abstractions var lf = new LoggerFactory().AddSerilog(); var log = lf.CreateLogger("ApplicationLogging"); // make it available to xBIM XbimLogging.LoggerFactory = lf; // use the log yourself log.LogInformation("Examples are just about to start."); QuickStart.Start(); BasicModelOperationsExample.Create(); BasicModelOperationsExample.Retrieve(); BasicModelOperationsExample.Update(); BasicModelOperationsExample.Delete(); log.LogWarning("Always use LINQ instead of general iterations!"); CubeWithColourExample.Run(); LinqExample.SelectionWithLinq(); LinqExample.SelectionWithoutLinq(); LinqExample.SelectionWithLinqLanguage(); log.LogError("This is how the error would be logged with Serilog."); BasicFederationExample.Run(); InverseSearchExample.Run(); FederationExample.CreateFederation(); ChangeLogExample.CreateLog(); StepToXmlExample.Convert(); SpatialStructureExample.Show(); NestedCartesianPointListExample.Run(); SingleObjectExample.Run(); GetMaterialsAndContainmentExample.Run(); log.LogInformation("All examples finished."); }
public static void Main() { //IfcValueEnum.Export(); //return; var log = LoggerFactory.GetLogger(); log.Info("Examples are just about to start."); QuickStart.Start(); BasicModelOperationsExample.Create(); BasicModelOperationsExample.Retrieve(); BasicModelOperationsExample.Update(); BasicModelOperationsExample.Delete(); log.Warn("Always use LINQ instead of general iterations!"); LinqExample.SelectionWithLinq(); LinqExample.SelectionWithoutLinq(); LinqExample.SelectionWithLinqLanguage(); log.Error("This is how the error would be logged with log4net."); FederationExample.CreateFederation(); ChangeLogExample.CreateLog(); StepToXmlExample.Convert(); SpatialStructureExample.Show(); ExpandExample.ExpandAttributes(); NestedCartesianPointListExample.Run(); log.Info("All examples finished."); }