<commit_before>using System;
using System.Collections.Generic;
using System.Text;
using SolidWorks.Interop.sldworks;
using SolidWorks.Interop.swconst;
using Thumbnail;

namespace ArchivePDF.csproj {
  public class ArchivePDFWrapper {
    public ArchivePDFWrapper(SldWorks sw) {
      swApp = sw;
    }

    public ArchivePDFWrapper(SldWorks sw, PathSet ps) {
      swApp = sw;
      APathSet = ps;
    }

    public void Archive() {
      string jsonPath = Properties.Settings.Default.defaultJSON;

      if (System.IO.File.Exists(Properties.Settings.Default.localJSON))
        jsonPath = Properties.Settings.Default.localJSON;

      string json = string.Empty;
      Frame swFrams = (Frame)swApp.Frame();
      swFrams.SetStatusBarText("Starting PDF Archiver...");
      ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc;
      Int32 errors = 0;
      Int32 warnings = 0;
      swDocumentTypes_e docType;
      docType = (swDocumentTypes_e)swModel.GetType();

      if (docType != swDocumentTypes_e.swDocDRAWING) {
        swApp.SendMsgToUser2(string.Format("You need to have a drawing open. This is a '{0}'.", docType.ToString()),
            (int)swMessageBoxIcon_e.swMbStop, (int)swMessageBoxBtn_e.swMbOk);
      } else {

        if (System.IO.File.Exists(jsonPath) && !APathSet.Initialated) {
          try {
            json = System.IO.File.ReadAllText(jsonPath);
          } catch (Exception e) {
            ErrMsg em = new ErrMsg(e);<commit_msg>Expose the gaugesetter so it can be used separately.<commit_after>using System;
using System.Collections.Generic;
using System.Text;
using SolidWorks.Interop.sldworks;
using SolidWorks.Interop.swconst;
using Thumbnail;

namespace ArchivePDF.csproj {
  public class ArchivePDFWrapper {
    public ArchivePDFWrapper(SldWorks sw) {
      swApp = sw;
    }

    public ArchivePDFWrapper(SldWorks sw, PathSet ps) {
      swApp = sw;
      APathSet = ps;
    }

		public void CheckGauges() {
			GaugeSetter gs_ = new GaugeSetter(swApp, APathSet);
			gs_.CheckAndUpdateGaugeNotes2();
		}

    public void Archive() {
      string jsonPath = Properties.Settings.Default.defaultJSON;

      if (System.IO.File.Exists(Properties.Settings.Default.localJSON))
        jsonPath = Properties.Settings.Default.localJSON;

      string json = string.Empty;
      Frame swFrams = (Frame)swApp.Frame();
      swFrams.SetStatusBarText("Starting PDF Archiver...");
      ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc;
      Int32 errors = 0;
      Int32 warnings = 0;
      swDocumentTypes_e docType;
      docType = (swDocumentTypes_e)swModel.GetType();

      if (docType != swDocumentTypes_e.swDocDRAWING) {
        swApp.SendMsgToUser2(string.Format("You need to have a drawing open. This is a '{0}'.", docType.ToString()),
            (int)swMessageBoxIcon_e.swMbStop, (int)swMessageBoxBtn_e.swMbOk);
      } else {

        if (System.IO.File.Exists(jsonPath) && !APathSet.Initialated) {
          try {
            json = System.IO.File.ReadAllText(jsonPath);
          } catch (Exception e) {
            ErrMsg em = new ErrMsg(e);
{'fraction_non_alphanumeric': 0.10601626016260163, 'fraction_numerical': 0.006829268292682927, 'mean_word_length': 3.036745406824147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '643686', 'n_tokens_mistral': 1015, 'n_tokens_neox': 957, 'n_words': 204}