예제 #1
0
 /// <summary>
 /// Constructor which takes a existing model as an argument. 
 /// You can also close and open any model from the script.
 /// </summary>
 /// <param name="model">Model which shuldbe used for the script execution</param>
 public XbimQueryParser(XbimModel model)
 {
     _scanner = new Scanner();
     _parser = new Parser(_scanner, model);
     _parser.OnModelChanged += delegate(object sender, ModelChangedEventArgs e) {
         ModelChanged(e.NewModel);
     };
 }
예제 #2
0
 /// <summary>
 /// Parameterless constructor of the class. 
 /// Default empty model is created which can be used 
 /// or you can open other model from the script.
 /// </summary>
 public XbimQueryParser()
 {
     //create new empty model
     var model = XbimModel.CreateTemporaryModel();
     _scanner = new Scanner();
     _parser = new Parser(_scanner, model);
     _parser.OnModelChanged += delegate(object sender, ModelChangedEventArgs e)
     {
         ModelChanged(e.NewModel);
     };
 }
예제 #3
0
 private void Init(XbimModel model)
 {
     if (model == null)
         model = XbimModel.CreateTemporaryModel();
     _scanner = new Scanner();
     _parser = new Parser(_scanner, model);
     _parser.OnModelChanged += delegate(object sender, ModelChangedEventArgs e)
     {
         ModelChanged(e.NewModel);
     };
     _parser.OnFileReportCreated += delegate(object sender, FileReportCreatedEventArgs e)
     {
         FileReportCreated(e.FilePath);
     };
 }