// Token: 0x0600005E RID: 94 RVA: 0x00004B14 File Offset: 0x00002D14 private static void FillProjectDescription(ItOrder order, CNCProjectData projectData) { bool flag = !string.IsNullOrEmpty(projectData.ProjectDescription.Line1); if (flag) { order.GenericOrderInfo01 = projectData.ProjectDescription.Line1; } bool flag2 = !string.IsNullOrEmpty(projectData.ProjectDescription.Line2); if (flag2) { order.GenericOrderInfo02 = projectData.ProjectDescription.Line2; } bool flag3 = !string.IsNullOrEmpty(projectData.ProjectDescription.Line3); if (flag3) { order.GenericOrderInfo03 = projectData.ProjectDescription.Line3; } bool flag4 = !string.IsNullOrEmpty(projectData.ProjectDescription.Line4); if (flag4) { order.GenericOrderInfo04 = projectData.ProjectDescription.Line4; } }
// Token: 0x0600005C RID: 92 RVA: 0x00004A64 File Offset: 0x00002C64 private static void FillBuildingOwner(ItOrder order, CNCProjectData projectData) { order.GenericOrderInfo09 = projectData.BuildingOwner.Name; order.GenericOrderInfo10 = projectData.BuildingOwner.Street; order.GenericOrderInfo11 = projectData.BuildingOwner.ZipCode; order.GenericOrderInfo12 = projectData.BuildingOwner.Place; }
// Token: 0x0600005D RID: 93 RVA: 0x00004ABC File Offset: 0x00002CBC private static void FillBuildingSite(ItOrder order, CNCProjectData projectData) { order.GenericOrderInfo05 = projectData.BuildingSite.Name; order.GenericOrderInfo06 = projectData.BuildingSite.Street; order.GenericOrderInfo07 = projectData.BuildingSite.ZipCode; order.GenericOrderInfo08 = projectData.BuildingSite.Place; }
/// <summary> /// 创建一个订单 /// </summary> /// <param name="doc"></param> /// <param name="projectData"></param> /// <returns></returns> private static ItOrder CreateOrderInstance(Document doc, CNCProjectData projectData) { bool flag = doc.isNull(); ItOrder result; if (flag) { result = null; } else { ProjectInfo projectInformation = doc.ProjectInformation; ItOrder itOrder = new ItOrder { OrderNo = projectData.General.OrderNumber, Component = projectData.General.Component, Storey = projectData.General.Storey, DrawingNo = projectData.General.DrawingNumber, DrawingDate = projectData.DrawingData.Date, DrawingRevision = projectData.DrawingData.Revision, DrawingAuthor = projectData.DrawingData.Author, Comment = projectData.CommentPXML }; ItCreatePXML.FillProjectDescription(itOrder, projectData); ItCreatePXML.FillBuildingSite(itOrder, projectData); ItCreatePXML.FillBuildingOwner(itOrder, projectData); ItCreatePXML.FillGenericOrderInfo(itOrder, projectData); ItCreatePXML.FillApplicationData(itOrder, doc); result = itOrder; } return(result); }
/// <summary> /// 获取当前的文档对象 /// </summary> /// <param name="projectData"></param> /// <param name="instance"></param> /// <param name="options"></param> /// <param name="fullFilePath"></param> /// <param name="cancel"></param> /// <returns></returns> private static ItDocument GetDocument(CNCProjectData projectData, AssemblyInstance instance, ICamExportIntOptions options, string fullFilePath, out bool cancel) { cancel = false; bool flag = instance == null; ItDocument result; if (flag) { result = null; } else { bool flag2 = ItCNCFileWriter.dontOverwriteExistingFile(fullFilePath, options.OverwriteMode, out cancel); bool flag3 = flag2 | cancel; if (flag3) { result = null; } else { string fileName = Path.GetFileName(fullFilePath); string directoryName = Path.GetDirectoryName(fullFilePath); ItDocument itDocument = new ItDocument { productType = instance.productType(), FilePath = directoryName, FileName = fileName }; itDocument.prepare(projectData); result = itDocument; } } return(result); }
/// <summary> /// 填充订单信息 /// </summary> /// <param name="order"></param> /// <param name="projectData"></param> private static void FillGenericOrderInfo(ItOrder order, CNCProjectData projectData) { bool flag = !string.IsNullOrEmpty(projectData.GenericOrderInfo.Line13); if (flag) { order.GenericOrderInfo13 = projectData.GenericOrderInfo.Line13; } bool flag2 = !string.IsNullOrEmpty(projectData.GenericOrderInfo.Line14); if (flag2) { order.GenericOrderInfo14 = projectData.GenericOrderInfo.Line14; } bool flag3 = !string.IsNullOrEmpty(projectData.GenericOrderInfo.Line15); if (flag3) { order.GenericOrderInfo15 = projectData.GenericOrderInfo.Line15; } bool flag4 = !string.IsNullOrEmpty(projectData.GenericOrderInfo.Line16); if (flag4) { order.GenericOrderInfo16 = projectData.GenericOrderInfo.Line16; } bool flag5 = !string.IsNullOrEmpty(projectData.GenericOrderInfo.Line17); if (flag5) { order.GenericOrderInfo17 = projectData.GenericOrderInfo.Line17; } bool flag6 = !string.IsNullOrEmpty(projectData.GenericOrderInfo.Line18); if (flag6) { order.GenericOrderInfo18 = projectData.GenericOrderInfo.Line18; } bool flag7 = !string.IsNullOrEmpty(projectData.GenericOrderInfo.Line19); if (flag7) { order.GenericOrderInfo19 = projectData.GenericOrderInfo.Line19; } bool flag8 = !string.IsNullOrEmpty(projectData.GenericOrderInfo.Line20); if (flag8) { order.GenericOrderInfo20 = projectData.GenericOrderInfo.Line20; } }
// Token: 0x06000026 RID: 38 RVA: 0x00003554 File Offset: 0x00001754 public static CNCProjectData Create(Document doc, ItCfgNode node) { CNCProjectData.GeneralDataClass generalData = CNCProjectData.GetGeneralData(node); CNCProjectData.ProjectDescriptionClass projectDescription = CNCProjectData.GetProjectDescription(node["ProjectDescription"]); CNCProjectData.Address address = CNCProjectData.GetAddress(node["BuildingSite"]); CNCProjectData.Address address2 = CNCProjectData.GetAddress(node["BuildingOwner"]); CNCProjectData.DrawingDataClass drawingData = CNCProjectData.GetDrawingData(node); CNCProjectData.GenericOrderInfoClass genericOrderInfo = CNCProjectData.GetGenericOrderInfo(node); ItCfgNode itCfgNode = node["Comment"]; string commentPxml = ((itCfgNode != null) ? itCfgNode.value : null) ?? string.Empty; string docId = CNCProjectData.GetDocId(doc); return(new CNCProjectData(generalData, projectDescription, address, address2, drawingData, genericOrderInfo, commentPxml, docId)); }
// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250 internal static CmdResult Export(Document document, ref string message, IEnumerable <AssemblyInstance> assemblies, ICamExportIntOptions options, bool variedFormats, out bool bCancelCommand) { bCancelCommand = false; assemblies = ((assemblies != null) ? assemblies.ToList <AssemblyInstance>() : null); bool flag = assemblies == null || assemblies.none <AssemblyInstance>(); CmdResult result; if (flag) { result = CmdResult.Succeeded; } else { IEnumerable <ElementId> assemblyInstanceIds = (from element in assemblies select element.Id).ToList <ElementId>(); bool flag2; CamIntEvents.OnExporting(document, assemblyInstanceIds, options, out flag2); CmdResult cmdResult = CmdResult.Succeeded; bool flag3 = !flag2; if (flag3) { CNCProjectData cncprojectData = CamExporter.GetCNCProjectData(document, options.FileFormat); switch (options.FileFormat) { case FileFormat.Unitechnik52: case FileFormat.Unitechnik60: cmdResult = CamExporter.executeUniCAM(ref message, assemblies, options, cncprojectData, out bCancelCommand); break; case FileFormat.PXML13: cmdResult = CamExporter.executePXML(ref message, assemblies, options, cncprojectData, out bCancelCommand); break; default: throw new InvalidOperationException("Unknown file format for CAM export."); } bool flag4 = cmdResult == CmdResult.Failed; if (flag4) { CamExporter.showError(options.FileFormat); } } CamIntExportStatus status = CamExporter.DetermineStatus(cmdResult, bCancelCommand, flag2); CamIntEvents.OnExported(document, assemblyInstanceIds, options, status); result = cmdResult; } return(result); }
// Token: 0x06000006 RID: 6 RVA: 0x00002514 File Offset: 0x00000714 private static CNCProjectData GetCNCProjectData(Document document, FileFormat format) { ItXmlConfig configData = new ItConfig(document).getConfigData(); string formatNodeName = CamExporter.GetFormatNodeName(format); bool flag = string.IsNullOrEmpty(formatNodeName); CNCProjectData result; if (flag) { result = null; } else { ItCfgNode node = configData.CamRootNode[formatNodeName]; CNCProjectData cncprojectData = CNCProjectData.Create(document, node); result = cncprojectData; } return(result); }
// Token: 0x06000072 RID: 114 RVA: 0x0000543C File Offset: 0x0000363C private bool ExportShellToPxml(ItDocument cncDoc, AssemblyInstance assemblyInstance, CNCProjectData projectData, ItMachineDataWallDB.DbwElementData.Shell shell, int doubleWallGapInMM) { ItGeMatrix3d matWcsToPalette = base.MatWcsToPalette; base.MatWcsToPalette = shell.Transformation; this.Mode = shell.Mode; bool flag = base.ExportPxml(assemblyInstance, new RevitElement <Part>[] { shell.Part }, cncDoc, projectData); bool flag2 = !flag; bool result; if (flag2) { result = flag; } else { base.MatWcsToPalette = matWcsToPalette; result = true; } return(result); }
// Token: 0x06000020 RID: 32 RVA: 0x00002E1C File Offset: 0x0000101C public static string Parse(string ruleString, AssemblyInstance assemblyInstance, CNCProjectData projectData, bool allowsSpaces = true) { bool flag = projectData.isNull(); string result; if (flag) { result = string.Empty; } else { string text; if (assemblyInstance == null) { text = null; } else { Document document = assemblyInstance.Document; text = ((document != null) ? document.PathName : null); } string path = text; string text2 = projectData.DrawingData.Date; DateTime dateTime; bool flag2 = DateTime.TryParseExact(text2, "dd.MM.yyyy", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out dateTime); if (flag2) { text2 = dateTime.ToString("yyyyMMdd"); } Dictionary <string, string> valuesDict = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase) { { CNCFilenameTokens.FileName.ToString(), Path.GetFileNameWithoutExtension(path) }, { CNCFilenameTokens.Date.ToString(), DateTime.Now.ToString("yyyyMMdd") }, { CNCFilenameTokens.Time.ToString(), DateTime.Now.ToString("hhmmss") }, { CNCFilenameTokens.ProdNo.ToString(), assemblyInstance.prodNo().ToString() }, { CNCFilenameTokens.OrderNumber.ToString(), projectData.General.OrderNumber }, { CNCFilenameTokens.Component.ToString(), projectData.General.Component }, { CNCFilenameTokens.Storey.ToString(), projectData.General.Storey }, { CNCFilenameTokens.DrawingNumber.ToString(), projectData.General.DrawingNumber }, { CNCFilenameTokens.ProjectDescriptionLine1.ToString(), projectData.ProjectDescription.Line1 }, { CNCFilenameTokens.ProjectDescriptionLine2.ToString(), projectData.ProjectDescription.Line2 }, { CNCFilenameTokens.ProjectDescriptionLine3.ToString(), projectData.ProjectDescription.Line3 }, { CNCFilenameTokens.ProjectDescriptionLine4.ToString(), projectData.ProjectDescription.Line4 }, { CNCFilenameTokens.BuildingSiteName.ToString(), projectData.BuildingSite.Name }, { CNCFilenameTokens.BuildingSiteStreet.ToString(), projectData.BuildingSite.Street }, { CNCFilenameTokens.BuildingSitePostCode.ToString(), projectData.BuildingSite.ZipCode }, { CNCFilenameTokens.BuildingSitePlace.ToString(), projectData.BuildingSite.Place }, { CNCFilenameTokens.BuildingOwnerName.ToString(), projectData.BuildingOwner.Name }, { CNCFilenameTokens.BuildingOwnerStreet.ToString(), projectData.BuildingOwner.Street }, { CNCFilenameTokens.BuildingOwnerPostCode.ToString(), projectData.BuildingOwner.ZipCode }, { CNCFilenameTokens.BuildingOwnerPlace.ToString(), projectData.BuildingOwner.Place }, { CNCFilenameTokens.DrawingDate.ToString(), text2 }, { CNCFilenameTokens.DrawingRevision.ToString(), projectData.DrawingData.Revision }, { CNCFilenameTokens.DrawingAuthor.ToString(), projectData.DrawingData.Author }, { CNCFilenameTokens.GenericOrderInfo01.ToString(), projectData.ProjectDescription.Line1 }, { CNCFilenameTokens.GenericOrderInfo02.ToString(), projectData.ProjectDescription.Line2 }, { CNCFilenameTokens.GenericOrderInfo03.ToString(), projectData.ProjectDescription.Line3 }, { CNCFilenameTokens.GenericOrderInfo04.ToString(), projectData.ProjectDescription.Line4 }, { CNCFilenameTokens.GenericOrderInfo05.ToString(), projectData.BuildingSite.Name }, { CNCFilenameTokens.GenericOrderInfo06.ToString(), projectData.BuildingSite.Street }, { CNCFilenameTokens.GenericOrderInfo07.ToString(), projectData.BuildingSite.ZipCode }, { CNCFilenameTokens.GenericOrderInfo08.ToString(), projectData.BuildingSite.Place }, { CNCFilenameTokens.GenericOrderInfo09.ToString(), projectData.BuildingOwner.Name }, { CNCFilenameTokens.GenericOrderInfo10.ToString(), projectData.BuildingOwner.Street }, { CNCFilenameTokens.GenericOrderInfo11.ToString(), projectData.BuildingOwner.ZipCode }, { CNCFilenameTokens.GenericOrderInfo12.ToString(), projectData.BuildingOwner.Place }, { CNCFilenameTokens.GenericOrderInfo13.ToString(), projectData.GenericOrderInfo.Line13 }, { CNCFilenameTokens.GenericOrderInfo14.ToString(), projectData.GenericOrderInfo.Line14 }, { CNCFilenameTokens.GenericOrderInfo15.ToString(), projectData.GenericOrderInfo.Line15 }, { CNCFilenameTokens.GenericOrderInfo16.ToString(), projectData.GenericOrderInfo.Line16 }, { CNCFilenameTokens.GenericOrderInfo17.ToString(), projectData.GenericOrderInfo.Line17 }, { CNCFilenameTokens.GenericOrderInfo18.ToString(), projectData.GenericOrderInfo.Line18 }, { CNCFilenameTokens.GenericOrderInfo19.ToString(), projectData.GenericOrderInfo.Line19 }, { CNCFilenameTokens.GenericOrderInfo20.ToString(), projectData.GenericOrderInfo.Line20 } }; string text3 = FileNameParser.Parse(ruleString, valuesDict, true); result = text3; } return(result); }
/// <summary> /// 执行数据的导出 /// </summary> /// <param name="message"></param> /// <param name="assemblies"></param> /// <param name="options"></param> /// <param name="projectData"></param> /// <param name="bExit"></param> /// <returns></returns> public static CmdResult executePXML(ref string message, IEnumerable <AssemblyInstance> assemblies, ICamExportIntOptions options, CNCProjectData projectData, out bool bExit) { assemblies = assemblies.ToList <AssemblyInstance>(); bool flag = assemblies.none <AssemblyInstance>(); CmdResult result; if (flag) { bExit = true; result = CmdResult.Failed; } else { bExit = false; Document document = assemblies.First <AssemblyInstance>().Document; ItTransactionManager.Instance.reset(document); using (ItTransaction itTransaction = ItTransactionManager.Instance.start(document, "export CNC data", null)) { try { ItCreatePXML itCreatePXML = new ItCreatePXML(assemblies, options); itCreatePXML.run(projectData); bExit = itCreatePXML.UserCanceled; itTransaction.commit(); } catch (Exception ex) { message = ex.Message; ItLogging.print("Exception in ItCmdCreateMaschData"); ItLogging.printException(ex); itTransaction.rollback("Exception"); return(CmdResult.Failed); } } result = CmdResult.Succeeded; } return(result); }
// Token: 0x06000009 RID: 9 RVA: 0x000025D4 File Offset: 0x000007D4 public static CmdResult executeUniCAM(ref string message, IEnumerable <AssemblyInstance> assemblies, ICamExportIntOptions options, CNCProjectData projectData, out bool bExit) { assemblies = assemblies.ToList <AssemblyInstance>(); bool flag = assemblies.none <AssemblyInstance>(); CmdResult result; if (flag) { bExit = true; result = CmdResult.Failed; } else { Document document = assemblies.First <AssemblyInstance>().Document; bExit = false; bool flag2 = projectData == null; if (flag2) { ItFailures.PostFailure(ItFailures.CAMMissingProjectData, ElementId.InvalidElementId); } ItTransactionManager.Instance.reset(document); using (ItTransaction itTransaction = ItTransactionManager.Instance.start(document, CamExporter._lclExportCNCTransaction, null)) { try { int val = 0; int val2 = 0; foreach (AssemblyInstance assemblyInstance in assemblies) { Parameter parameter = assemblyInstance.getParameter(ItGlobals.PRODNUMBERPARAM, true, true); bool flag3 = parameter.isNull(); if (!flag3) { bool hasValue = parameter.HasValue; if (hasValue) { RevitElement <Part> part = assemblyInstance.getPart(null); bool flag4 = part == null; if (!flag4) { Element mainElement = part.getMainElement(); int val3; int.TryParse(parameter.AsString(), out val3); bool flag5 = mainElement is Wall; if (flag5) { val = Math.Max(val, val3); } else { bool flag6 = mainElement is Floor; if (flag6) { val2 = Math.Max(val2, val3); } } } } } } options.TargetDirectory.Create(); DirectoryInfo targetDirectory = options.TargetDirectory; foreach (AssemblyInstance assemblyInstance2 in assemblies) { try { Parameter parameter2 = assemblyInstance2.getParameter(ItGlobals.PRODNUMBERPARAM, true, true); bool flag7 = parameter2 == null; if (!flag7) { RevitElement <Part> part2 = assemblyInstance2.getPart(null); bool flag8 = part2 == null; if (!flag8) { Element mainElement2 = part2.getMainElement(); ProductType product = part2.productType(); bool subdirectoryPerProductType = options.SubdirectoryPerProductType; if (subdirectoryPerProductType) { options.TargetDirectory = targetDirectory.CreateSubdirectory(product.ToString()); } ItMachineDataBase cncdocCreator = ItCNCDataFactory.getCNCDocCreator(assemblyInstance2, options); bool flag9 = cncdocCreator.isNull(); if (!flag9) { bool flag10 = mainElement2 is Wall; if (flag10) { CamExporter.FixProdNumber(parameter2, ref val); } else { bool flag11 = mainElement2 is Floor; if (flag11) { CamExporter.FixProdNumber(parameter2, ref val2); } } int iProdNo = Convert.ToInt32(parameter2.AsString()); string unitechnikFilename = ItMachineDataBase.GetUnitechnikFilename(assemblyInstance2, options, projectData); bool flag12; CamIntEvents.OnExportingAssembly(document, assemblyInstance2.Id, options, product, unitechnikFilename, out flag12); bool flag13 = flag12; if (!flag13) { bool flag14 = CamExporter.CheckUnitechnikFilename(options, unitechnikFilename, out bExit); bool success = false; bool flag15 = flag14 && !bExit; if (flag15) { success = cncdocCreator.createMachineDataUnitechnik(assemblyInstance2, iProdNo, projectData, unitechnikFilename); } CamIntExportStatus status = CamExporter.DetermineStatus(success, bExit, flag14); CamIntEvents.OnExportedAssembly(document, assemblyInstance2.Id, options, product, unitechnikFilename, status); bool flag16 = bExit; if (flag16) { break; } } } } } } catch (SplitByOpeningNotSupportedException ex) { ItFailures.PostFailure(ItFailures.SplitByOpeningNotSupported, ex.ElementId); } } itTransaction.commit(); } catch (Exception ex2) { message = ex2.Message; ItLogging.print("Exception in ItCmdCreateMaschData"); ItLogging.printException(ex2); itTransaction.rollback("Exception"); return(CmdResult.Failed); } } result = (bExit ? CmdResult.Cancelled : CmdResult.Succeeded); } return(result); }
private static extern void setProjectData(CNCProjectData data);
// Token: 0x06000118 RID: 280 RVA: 0x00009C4D File Offset: 0x00007E4D internal static void SetProjectData(CNCProjectData data) { ItDebug.assert(data.CheckNoNullFields(), "no fields must be null in the CNCProjectData, use string.Empty instead"); ItUniWrapperImpl.setProjectData(data); }
// Token: 0x0600006E RID: 110 RVA: 0x0000522C File Offset: 0x0000342C protected override bool ExportPxml(AssemblyInstance assemblyInstance, IEnumerable <RevitElement <Part> > part, ItDocument cncDoc, CNCProjectData projectData) { RevitElement <Part> firstShell; RevitElement <Part> secondShell; ItMachineDataWallML.GetShells(assemblyInstance, out firstShell, out secondShell); ItMachineDataWallDB.DbwElementData dbwElementData = new ItMachineDataWallDB.DbwElementData(base.MatWcsToPalette, firstShell, secondShell); ItMachineDataWallDB.DetermineCombinedBoundingBox(dbwElementData); ItMachineDataWallDB.DetermineDoubleWallGap(dbwElementData); int doubleWallGapInMM = (int)Math.Round(dbwElementData.Gap.FeetToMeter() * 1000.0); ItMachineDataWallDB.DetermineShellTransformations(dbwElementData); bool flag = this.ExportShellToPxml(cncDoc, assemblyInstance, projectData, dbwElementData.FirstShell, doubleWallGapInMM); bool flag2 = !flag; bool result; if (flag2) { result = false; } else { flag = this.ExportShellToPxml(cncDoc, assemblyInstance, projectData, dbwElementData.SecondShell, doubleWallGapInMM); result = flag; } return(result); }
// Token: 0x06000061 RID: 97 RVA: 0x00004C64 File Offset: 0x00002E64 public static string GetFileName(AssemblyInstance instance, CNCProjectData projectData, ICamExportIntOptions options, ItDocument cncDoc) { bool flag = cncDoc != null && options.MultipleElementsInOneFile; string result; if (flag) { result = Path.Combine(cncDoc.FilePath, cncDoc.FileName); } else { ItCfgNode itCfgNode; if (instance == null) { itCfgNode = null; } else { Document document = instance.Document; if (document == null) { itCfgNode = null; } else { ItXmlConfig config = document.getConfig(); itCfgNode = ((config != null) ? config.CamRootNode : null); } } ItCfgNode itCfgNode2 = itCfgNode; string text; if (itCfgNode2 == null) { text = null; } else { ItCfgNode itCfgNode3 = itCfgNode2["PXML"]; text = ((itCfgNode3 != null) ? itCfgNode3["FileNameRules"].value : null); } string text2 = text; bool flag2 = string.IsNullOrWhiteSpace(text2); if (flag2) { text2 = "Element_\"ProdNo\".pxml"; } bool flag3 = projectData.isNull(); if (flag3) { result = text2; } else { ProductType productType = (instance != null) ? instance.productType() : ProductType.None; DirectoryInfo directoryInfo = options.TargetDirectory; bool subdirectoryPerProductType = options.SubdirectoryPerProductType; if (subdirectoryPerProductType) { directoryInfo = directoryInfo.CreateSubdirectory(productType.ToString()); } string path = CNCFileNameParser.Parse(text2, instance, projectData, true); string text3 = Path.Combine(directoryInfo.FullName, path); result = text3; } } return(result); }
/// <summary> /// 执行导出操作 /// </summary> /// <param name="projectData"></param> public void run(CNCProjectData projectData) { XmlRootAttribute root = new XmlRootAttribute("PXML_Document") { Namespace = "http://progress-m.com/ProgressXML/Version1" }; XmlSerializer serializer = new XmlSerializer(typeof(ItDocument), root); List <ItDocument> list = new List <ItDocument>(); ItDocument itDocument = null; this._options.TargetDirectory.Create(); //读取所有的部件 foreach (AssemblyInstance assemblyInstance in this._assemblies) { ProductType productType = assemblyInstance.productType(); bool flag = productType == ProductType.None; if (flag) { ItFailures.PostFailure(ItFailures.CAMManualCreatedAssemblyNotSupported, assemblyInstance.Id); } else { bool flag2 = this.IsAlreadyWritten(assemblyInstance, list); if (!flag2) { string fileName = ItCreatePXML.GetFileName(assemblyInstance, projectData, this._options, itDocument); bool flag3; CamIntEvents.OnExportingAssembly(this._rvtDoc, assemblyInstance.Id, this._options, productType, fileName, out flag3); bool flag4 = flag3; if (flag4) { CamIntEvents.OnExportedAssembly(this._rvtDoc, assemblyInstance.Id, this._options, productType, fileName, CamIntExportStatus.EventCanceled); } else { bool flag5 = !this._options.MultipleElementsInOneFile || itDocument == null; if (flag5) { bool userCanceled; itDocument = ItCreatePXML.GetDocument(projectData, assemblyInstance, this._options, fileName, out userCanceled); this.UserCanceled = userCanceled; bool userCanceled2 = this.UserCanceled; if (userCanceled2) { CamIntEvents.OnExportedAssembly(this._rvtDoc, assemblyInstance.Id, this._options, productType, fileName, CamIntExportStatus.UserCanceled); return; } bool flag6 = itDocument == null; if (flag6) { CamIntEvents.OnExportedAssembly(this._rvtDoc, assemblyInstance.Id, this._options, productType, fileName, CamIntExportStatus.Skipped); bool multipleElementsInOneFile = this._options.MultipleElementsInOneFile; if (multipleElementsInOneFile) { return; } continue; } else { list.Add(itDocument); ItOrder item = ItCreatePXML.CreateOrderInstance(this._rvtDoc, projectData); List <ItOrder> orders = itDocument.Orders; if (orders != null) { orders.Add(item); } } } this.AddProduct(itDocument); ItMachineDataBase cncdocCreator = ItCNCDataFactory.getCNCDocCreator(assemblyInstance, this._options); RevitElement <Part> partOfShellType = assemblyInstance.getPartOfShellType(ShellType.FirstShell); itDocument.IsValid = cncdocCreator.CreateMachineDataPxml(assemblyInstance, partOfShellType, itDocument, projectData); CamIntExportStatus status = CamIntExportStatus.None; bool flag7 = !this._options.MultipleElementsInOneFile; if (flag7) { string text; bool flag8 = this.WriteFile(itDocument, serializer, out text); bool flag9 = flag8; if (flag9) { int num = this.Successes; this.Successes = num + 1; status = CamIntExportStatus.Success; } else { int num = this.Failures; this.Failures = num + 1; status = CamIntExportStatus.Failed; } } CamIntEvents.OnExportedAssembly(this._rvtDoc, assemblyInstance.Id, this._options, productType, fileName, status); } } } } bool flag10 = this._options.MultipleElementsInOneFile && itDocument != null; if (flag10) { string fileName2; bool flag11 = this.WriteFile(itDocument, serializer, out fileName2); bool flag12 = flag11; CamIntExportStatus status2; if (flag12) { int num = this.Successes; this.Successes = num + 1; status2 = CamIntExportStatus.Success; } else { int num = this.Failures; this.Failures = num + 1; status2 = CamIntExportStatus.Failed; } CamIntEvents.OnExportedAssembly(this._rvtDoc, ElementId.InvalidElementId, this._options, ProductType.None, fileName2, status2); } }
// Token: 0x060000D5 RID: 213 RVA: 0x00008ECC File Offset: 0x000070CC protected override bool ExportUnitechnik(AssemblyInstance assemblyInstance, IEnumerable <RevitElement <Part> > parts, int iProdNo, CNCProjectData projectData) { Floor floor; if (parts == null) { floor = null; } else { RevitElement <Part> revitElement = parts.FirstOrDefault <RevitElement <Part> >(); floor = ((revitElement != null) ? revitElement.getFloor() : null); } Floor floor2 = floor; bool flag = floor2 == null; bool result; if (flag) { ItFailures.PostFailure(ItFailures.UnitechnikFailure, assemblyInstance.Id); result = false; } else { result = base.ExportUnitechnik(assemblyInstance, parts, iProdNo, projectData); } return(result); }
// Token: 0x06000071 RID: 113 RVA: 0x000053D0 File Offset: 0x000035D0 private bool ExportShellToUnitechnik(AssemblyInstance assemblyInstance, int iProdNo, CNCProjectData projectData, ItMachineDataWallDB.DbwElementData.Shell shell, int doubleWallGapInMM) { ItGeMatrix3d matWcsToPalette = base.MatWcsToPalette; base.MatWcsToPalette = shell.Transformation; this.Mode = shell.Mode; bool flag = base.ExportUnitechnik(assemblyInstance, new RevitElement <Part>[] { shell.Part }, iProdNo, projectData); ItUniWrapperImpl.SetDoubleWallGap(doubleWallGapInMM); bool flag2 = !flag; bool result; if (flag2) { result = flag; } else { base.MatWcsToPalette = matWcsToPalette; result = true; } return(result); }