diff --git a/AssemblyInfo.vb b/AssemblyInfo.vb index ca6c6ae05b45361027a9d45d3f07417ee30fae26..8816a57734aa004f148b68a1e98d940aeb33ed87 100644 --- a/AssemblyInfo.vb +++ b/AssemblyInfo.vb @@ -9,10 +9,10 @@ Imports System.Runtime.InteropServices ' Review the values of the assembly attributes - + - - + + 'The following GUID is for the ID of the typelib if this project is exposed to COM @@ -28,5 +28,5 @@ Imports System.Runtime.InteropServices ' You can specify all the values or you can default the Build and Revision Numbers ' by using the '*' as shown below: - - \ No newline at end of file + + \ No newline at end of file diff --git a/Class/PictureConverter.vb b/Class/PictureConverter.vb new file mode 100644 index 0000000000000000000000000000000000000000..9ca9354d7fcc6d6176c42256d47acb3c6ff3b82b --- /dev/null +++ b/Class/PictureConverter.vb @@ -0,0 +1,12 @@ +Friend Class PictureConverter + Inherits System.Windows.Forms.AxHost + + Private Sub New() + MyBase.New(String.Empty) + End Sub + + Public Shared Function ImageToPictureDisp( _ + ByVal image As System.Drawing.Image) As stdole.IPictureDisp + Return CType(GetIPictureDispFromPicture(image), stdole.IPictureDisp) + End Function +End Class \ No newline at end of file diff --git a/Class/clsMiniToolbar.vb b/Class/clsMiniToolbar.vb new file mode 100644 index 0000000000000000000000000000000000000000..6455d5030dede657af8d014b6a0f5c4f4eae3ac2 --- /dev/null +++ b/Class/clsMiniToolbar.vb @@ -0,0 +1,132 @@ +Imports Inventor +Imports System.Runtime.InteropServices + +Public Class clsMiniToolbar + Dim invApp As Inventor.Application + + Dim started As Boolean + + Private WithEvents m_miniToolbar As MiniToolbar + Private WithEvents m_button1 As MiniToolbarButton + Private WithEvents m_button2 As MiniToolbarButton + Private WithEvents m_button3 As MiniToolbarTextEditor + Private WithEvents m_combo As MiniToolbarSlider + Private WithEvents m_dropDown As MiniToolbarDropdown + + Public Sub New() + Try + invApp = Marshal.GetActiveObject("Inventor.Application") + Catch ex As Exception + MsgBox("Need to have a session of Inventor running") + Return + End Try + + If invApp.Documents.Count > 0 Then + createMiniToolbar() + Else + MsgBox("Need to have a document open") + End If + + End Sub + + Public Sub createMiniToolbar() + m_miniToolbar = invApp.CommandManager.CreateMiniToolbar() + Dim controls As MiniToolbarControls + + controls = m_miniToolbar.Controls + + m_button1 = controls.AddButton("InName选择", "选择", "选择一个尺寸") + + m_button2 = controls.AddButton("InName还原", "还原", "还原尺寸") + + m_button3 = controls.AddButton("InName还原", "还原", "还原尺寸") + + + m_button2.AutoHide = True + + m_miniToolbar.Controls.AddSeparator() + + 'm_button3 = controls.AddButton("MyButton3", "Button 3", "This is button 3") + + 'controls.AddNewLine() + + 'm_combo = controls.AddComboBox("MyCombo", True, True, 35) + + 'm_combo.AddItem("Item 1", "Item number 1", , True) + + 'm_combo.AddItem("Item 2", "Item number 2", , False) + + 'm_combo.AddItem("Item 3", "Item number 3", , False) + + 'm_combo.AddItem("Item 4", "Item number 4", , True) + + 'controls.AddLabel("MyLabel", "Some stuff:", "Stuff") + + 'm_dropDown = controls.AddDropdown("MyDropdown", True, True, True) + + 'm_dropDown.AddItem("Thing 1", "Thing 1 tooltip", , , , ) + 'm_dropDown.AddItem("Thing 2", "Thing 2 tooltip") + 'm_dropDown.AddItem("Thing 3", "Thing 3 tooltip", , , , ) + + m_miniToolbar.Visible = True + + + + End Sub + + + Private Sub m_button1_OnClick1() Handles m_button1.OnClick + + MsgBox("Clicked ""Button 1""") + + End Sub + + + + Private Sub m_button2_OnClick1() Handles m_button2.OnClick + + MsgBox("Clicked ""Button 2""") + + End Sub + + + Private Sub m_miniToolbar_OnApply() Handles m_miniToolbar.OnApply + MsgBox("Clicked ""Apply""") + End Sub + + + + Private Sub m_miniToolbar_OnCancel() Handles m_miniToolbar.OnCancel + + MsgBox("Clicked ""Cancel""") + + m_miniToolbar = Nothing + + m_button1 = Nothing + + m_button2 = Nothing + + m_button3 = Nothing + + m_combo = Nothing + + End Sub + + + + Private Sub m_miniToolbar_OnOK() Handles m_miniToolbar.OnOK + + MsgBox("Clicked ""Ok""") + + m_miniToolbar = Nothing + + m_button1 = Nothing + + m_button2 = Nothing + + m_button3 = Nothing + + m_combo = Nothing + + End Sub +End Class diff --git a/Form/frmAutoPartNumber.Designer.vb b/Form/frmAutoPartNumber.Designer.vb index 2b03792c48e9197444b829fa55e2f7707f0095d5..8696e2f217b049cdd4235fa918660bc25cae0feb 100644 --- a/Form/frmAutoPartNumber.Designer.vb +++ b/Form/frmAutoPartNumber.Designer.vb @@ -101,8 +101,8 @@ Partial Class frmAutoPartNumber ' Me.lvw文件列表.AllowDrop = True Me.lvw文件列表.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lvw文件列表.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ch原文件名, Me.ch类型, Me.ch新文件名, Me.ch文件夹}) Me.lvw文件列表.FullRowSelect = True Me.lvw文件列表.Location = New System.Drawing.Point(13, 12) @@ -236,12 +236,11 @@ Partial Class frmAutoPartNumber Me.btn确定新文件名.Name = "btn确定新文件名" Me.btn确定新文件名.Size = New System.Drawing.Size(25, 25) Me.btn确定新文件名.TabIndex = 34 - Me.btn确定新文件名.Text = "√" Me.btn确定新文件名.UseVisualStyleBackColor = True ' 'frmAutoPartNumber ' - Me.AcceptButton = Me.btn开始 + Me.AcceptButton = Me.btn确定新文件名 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.CancelButton = Me.btn关闭 diff --git a/Form/frmAutoPartNumber.vb b/Form/frmAutoPartNumber.vb index 24c9ae1540e9968a76c9d0afb81422d5c3b14986..42a9ffb35bbdd5861f2503fbe5f8f6cc744ec318 100644 --- a/Form/frmAutoPartNumber.vb +++ b/Form/frmAutoPartNumber.vb @@ -18,7 +18,12 @@ Public Class frmAutoPartNumber Try btn开始.Enabled = False - 'ThisApplication.Cursor = Cursors.WaitCursor + Me.TopMost = False + + Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents + oInteraction.Start() + oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) + For i = 0 To lvw文件列表.Items.Count - 1 oListViewItem = lvw文件列表.Items(i) @@ -81,13 +86,15 @@ Public Class frmAutoPartNumber 999: Next - Me.TopMost = False + Me.TopMost = True SetStatusBarText("自动命名图号完成!") MsgBox("自动命名图号完成", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "自动命名图号") btn开始.Enabled = True - 'ThisApplication.Cursor = Cursors.Default + + oInteraction.Stop() Catch ex As Exception + Me.TopMost = True btn开始.Enabled = True MsgBox(ex.Message) End Try @@ -238,7 +245,10 @@ Public Class frmAutoPartNumber Dim oInventorAssemblyDocument As Inventor.AssemblyDocument oInventorAssemblyDocument = ThisApplication.ActiveDocument + LoadAssBOM(oInventorAssemblyDocument, lvw文件列表) + + btn确定新文件名.Image = My.Resources.确定161632.ToBitmap End Sub '载入数据函数 @@ -318,9 +328,11 @@ Public Class frmAutoPartNumber '重载数据 Private Sub btn重载_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn重载.Click - Dim oAssemblyDocument As AssemblyDocument - oAssemblyDocument = ThisApplication.ActiveDocument - LoadAssBOM(oAssemblyDocument, lvw文件列表) + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument + oInventorAssemblyDocument = ThisApplication.ActiveDocument + + LoadAssBOM(oInventorAssemblyDocument, lvw文件列表) + End Sub Private Sub btn确定新文件名_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn确定新文件名.Click @@ -420,10 +432,10 @@ Public Class frmAutoPartNumber End If End Sub - Private Sub txt新文件名_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt新文件名.KeyPress - If Asc(e.KeyChar) = Keys.Enter Then - btn确定新文件名.PerformClick() - End If - End Sub + 'Private Sub txt新文件名_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt新文件名.KeyPress + ' If Asc(e.KeyChar) = Keys.Enter Then + ' btn确定新文件名.PerformClick() + ' End If + 'End Sub End Class \ No newline at end of file diff --git a/Form/frmChangeIpro.vb b/Form/frmChangeIpro.vb index 9d91d333aef3ce6197dda77338d77563881999c9..3b7b008418753841a44a7c21fec7097235c7667d 100644 --- a/Form/frmChangeIpro.vb +++ b/Form/frmChangeIpro.vb @@ -66,14 +66,14 @@ Public Class frmChangeIpro Next If oInventorDocument.DocumentType = Inventor.DocumentTypeEnum.kPartDocumentObject Then - Dim oPartDocument As Inventor.PartDocument = oInventorDocument + Dim oInventorPartDocument As Inventor.PartDocument = oInventorDocument cmb材料.Items.Clear() - For Each oMaterial In oPartDocument.Materials + For Each oMaterial In oInventorPartDocument.Materials cmb材料.Items.Add(oMaterial.Name) Next cmb材料.DropDownStyle = ComboBoxStyle.DropDownList - cmb材料.Text = oPartDocument.ComponentDefinition.Material.Name.ToString + cmb材料.Text = oInventorPartDocument.ComponentDefinition.Material.Name.ToString Else cmb材料.Enabled = False End If @@ -103,11 +103,10 @@ Public Class frmChangeIpro btn查询.Enabled = False - 'Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents - 'oInteraction.Start() - 'oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) - 'System.Threading.Thread.Sleep(5000) - 'oInteraction.Stop() + Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents + oInteraction.Start() + oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) + Dim oInventorDocument As Inventor.Document '当前文件 oInventorDocument = ThisApplication.ActiveEditDocument @@ -156,6 +155,7 @@ Public Class frmChangeIpro 'oInteraction.Stop() btn查询.Enabled = True + oInteraction.Stop() End Sub diff --git a/Form/frmERPCodeSearch.Designer.vb b/Form/frmERPCodeSearch.Designer.vb index 80a92adbe10bedf5acf24be2465b7d8460cb61f8..4a55a79241f93608aeb20f41752bc47962b2693d 100644 --- a/Form/frmERPCodeSearch.Designer.vb +++ b/Form/frmERPCodeSearch.Designer.vb @@ -105,6 +105,7 @@ Partial Class frmERPCodeSearch Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "ERP编码反查" + Me.TopMost = True Me.ResumeLayout(False) Me.PerformLayout() diff --git a/Form/frmERPCodeSearch.vb b/Form/frmERPCodeSearch.vb index b62ac24e41d5b2d48c4ee0192e6d9c7a7288a991..e4c817051e1e8a3527edada089b3c12e70fdff7a 100644 --- a/Form/frmERPCodeSearch.vb +++ b/Form/frmERPCodeSearch.vb @@ -32,6 +32,7 @@ Public Class frmERPCodeSearch arraystrinfo = ERPCodeSearch(BasicExcelFullFileName, strERPCode, TableArrays, ColIndexNum, 0) + If arraystrinfo(0) Is Nothing Then txt返回值.Text = "未查询到ERP编码。" Me.Height = 280 diff --git a/Form/frmEditDimension.Designer.vb b/Form/frmEditDimension.Designer.vb new file mode 100644 index 0000000000000000000000000000000000000000..8b3f7bc02923b5ba6734648f69520848531419f8 --- /dev/null +++ b/Form/frmEditDimension.Designer.vb @@ -0,0 +1,106 @@ + _ +Partial Class frmEditDimension + Inherits System.Windows.Forms.Form + + 'Form 重写 Dispose,以清理组件列表。 + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Windows 窗体设计器所必需的 + Private components As System.ComponentModel.IContainer + + '注意: 以下过程是 Windows 窗体设计器所必需的 + '可以使用 Windows 窗体设计器修改它。 + '不要使用代码编辑器修改它。 + _ + Private Sub InitializeComponent() + Me.TrackBar参数一 = New System.Windows.Forms.TrackBar() + Me.txt参数一 = New System.Windows.Forms.TextBox() + Me.btn选择一 = New System.Windows.Forms.Button() + Me.btn还原 = New System.Windows.Forms.Button() + Me.btn确定 = New System.Windows.Forms.Button() + CType(Me.TrackBar参数一, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'TrackBar参数一 + ' + Me.TrackBar参数一.AutoSize = False + Me.TrackBar参数一.LargeChange = 1 + Me.TrackBar参数一.Location = New System.Drawing.Point(12, 52) + Me.TrackBar参数一.Maximum = 50 + Me.TrackBar参数一.Minimum = -50 + Me.TrackBar参数一.Name = "TrackBar参数一" + Me.TrackBar参数一.Size = New System.Drawing.Size(256, 20) + Me.TrackBar参数一.TabIndex = 13 + Me.TrackBar参数一.TickStyle = System.Windows.Forms.TickStyle.None + ' + 'txt参数一 + ' + Me.txt参数一.Location = New System.Drawing.Point(66, 18) + Me.txt参数一.Name = "txt参数一" + Me.txt参数一.Size = New System.Drawing.Size(93, 21) + Me.txt参数一.TabIndex = 12 + ' + 'btn选择一 + ' + Me.btn选择一.Location = New System.Drawing.Point(12, 14) + Me.btn选择一.Name = "btn选择一" + Me.btn选择一.Size = New System.Drawing.Size(36, 32) + Me.btn选择一.TabIndex = 11 + Me.btn选择一.UseVisualStyleBackColor = True + ' + 'btn还原 + ' + Me.btn还原.Location = New System.Drawing.Point(178, 14) + Me.btn还原.Name = "btn还原" + Me.btn还原.Size = New System.Drawing.Size(36, 32) + Me.btn还原.TabIndex = 14 + Me.btn还原.UseVisualStyleBackColor = True + ' + 'btn确定 + ' + Me.btn确定.Location = New System.Drawing.Point(226, 14) + Me.btn确定.Name = "btn确定" + Me.btn确定.Size = New System.Drawing.Size(36, 32) + Me.btn确定.TabIndex = 15 + Me.btn确定.UseVisualStyleBackColor = True + ' + 'frmEditDimension + ' + Me.AcceptButton = Me.btn确定 + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(274, 83) + Me.Controls.Add(Me.btn确定) + Me.Controls.Add(Me.btn还原) + Me.Controls.Add(Me.TrackBar参数一) + Me.Controls.Add(Me.txt参数一) + Me.Controls.Add(Me.btn选择一) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "frmEditDimension" + Me.ShowInTaskbar = False + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "编辑尺寸" + Me.TopMost = True + CType(Me.TrackBar参数一, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + Friend WithEvents TrackBar参数一 As System.Windows.Forms.TrackBar + Friend WithEvents txt参数一 As System.Windows.Forms.TextBox + Friend WithEvents btn选择一 As System.Windows.Forms.Button + Friend WithEvents btn还原 As System.Windows.Forms.Button + Friend WithEvents btn确定 As System.Windows.Forms.Button + +End Class diff --git a/Form/frmEditDimension.resx b/Form/frmEditDimension.resx new file mode 100644 index 0000000000000000000000000000000000000000..1af7de150c99c12dd67a509fe57c10d63e4eeb04 --- /dev/null +++ b/Form/frmEditDimension.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Form/frmEditDimension.vb b/Form/frmEditDimension.vb new file mode 100644 index 0000000000000000000000000000000000000000..0517046e915ed6b5a21c2b47422993782315b64a --- /dev/null +++ b/Form/frmEditDimension.vb @@ -0,0 +1,233 @@ +Imports System.Windows.Forms +Imports Inventor +Imports System.Drawing + +Public Class frmEditDimension + + Private strDimensionConstraintFileName As String + Private strDimensionConstraintName As String + Private strDimensionConstraintValue As String + Private oDimensionConstraint As DimensionConstraint + + Private Sub txt参数一_KeyDown1(sender As Object, e As KeyEventArgs) Handles txt参数一.KeyDown + If e.KeyCode = Keys.Enter Then + Dim oInventorPartDocument As Inventor.PartDocument + oInventorPartDocument = ThisApplication.ActiveEditDocument + + oDimensionConstraint.Parameter.Expression = txt参数一.Text + + Select Case oDimensionConstraint.Parameter.Units + Case "mm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 10 - 50 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 10 + 50 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 10 + Case "cm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value - 5 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value + 5 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value + Case "deg" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 180 / Math.PI - 45 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 180 / Math.PI + 45 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 180 / Math.PI + End Select + + oInventorPartDocument.Update() + ThisApplication.ActiveView.Update() + + End If + End Sub + + + Private Sub btn选择一_Click_1(sender As Object, e As EventArgs) Handles btn选择一.Click + Dim oInventorPartDocument As Inventor.PartDocument + oInventorPartDocument = ThisApplication.ActiveEditDocument + + oDimensionConstraint = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kSketchDimConstraintFilter, "选择要编辑的尺寸,ESC键取消") + If oDimensionConstraint Is Nothing Then '取消选择 + Exit Sub + End If + + If ThisApplication.ActiveDocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then + strDimensionConstraintFileName = oDimensionConstraint.ContainingOccurrence.ReferencedDocumentDescriptor.FullDocumentName + + + If strDimensionConstraintFileName <> oInventorPartDocument.FullFileName Then + MsgBox("请选择当前编辑零件。", MsgBoxStyle.Information) + Exit Sub + End If + End If + + strDimensionConstraintName = oDimensionConstraint.Parameter.Name + strDimensionConstraintValue = oDimensionConstraint.Parameter.Expression + + + Me.Text = "编辑尺寸:" & strDimensionConstraintName + txt参数一.Text = strDimensionConstraintValue + + Select Case oDimensionConstraint.Parameter.Units + Case "mm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 10 - 50 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 10 + 50 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 10 + Case "cm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value - 5 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value + 5 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value + Case "deg" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 180 / Math.PI - 45 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 180 / Math.PI + 45 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 180 / Math.PI + End Select + + End Sub + + Private Sub TrackBar参数一_ValueChanged(sender As Object, e As EventArgs) Handles TrackBar参数一.Scroll + On Error Resume Next + Dim oInventorPartDocument As Inventor.PartDocument + oInventorPartDocument = ThisApplication.ActiveEditDocument + + Select Case oDimensionConstraint.Parameter.Units + Case "mm" + oDimensionConstraint.Parameter.Value = TrackBar参数一.Value * 0.1 + Case "cm" + oDimensionConstraint.Parameter.Value = TrackBar参数一.Value + Case "deg" + oDimensionConstraint.Parameter.Value = TrackBar参数一.Value * Math.PI / 180 + End Select + + txt参数一.Text = TrackBar参数一.Value + + oInventorPartDocument.Update() + ThisApplication.ActiveView.Update() + + End Sub + + Private Sub btn还原_Click(sender As Object, e As EventArgs) Handles btn还原.Click + Dim oInventorPartDocument As Inventor.PartDocument + oInventorPartDocument = ThisApplication.ActiveEditDocument + + oDimensionConstraint.Parameter.Expression = strDimensionConstraintValue + txt参数一.Text = strDimensionConstraintValue + + Select Case oDimensionConstraint.Parameter.Units + Case "mm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 10 - 50 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 10 + 50 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 10 + Case "cm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value - 5 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value + 5 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value + Case "deg" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 180 / Math.PI - 45 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 180 / Math.PI + 45 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 180 / Math.PI + End Select + + oInventorPartDocument.Update() + ThisApplication.ActiveView.Update() + + End Sub + + Private Sub frmChangeValue_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed + + If oDimensionConstraint Is Nothing Then + Exit Sub + End If + + If ThisApplication.ActiveEditDocument.DocumentType = DocumentTypeEnum.kPartDocumentObject Then + Dim oInventorPartDocument As Inventor.PartDocument + oInventorPartDocument = ThisApplication.ActiveEditDocument + oDimensionConstraint.Parameter.Expression = strDimensionConstraintValue + oInventorPartDocument.Update() + ThisApplication.ActiveView.Update() + End If + + + End Sub + + Private Sub btn确定_Click(sender As Object, e As EventArgs) Handles btn确定.Click + strDimensionConstraintValue = txt参数一.Text + + Select Case oDimensionConstraint.Parameter.Units + Case "mm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 10 - 50 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 10 + 50 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 10 + Case "cm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value - 5 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value + 5 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value + Case "deg" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 180 / Math.PI - 45 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 180 / Math.PI + 45 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 180 / Math.PI + End Select + + End Sub + + Private Sub frmChangeValue_Load(sender As Object, e As EventArgs) Handles MyBase.Load + 'On Error Resume Next + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument + Dim oInventorPartDocument As Inventor.PartDocument + oInventorPartDocument = ThisApplication.ActiveEditDocument + + ' 是否已经选择了尺寸 + Dim oSelectSet As Object = Nothing + + '在组件中 + If ThisApplication.ActiveDocument.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then + oInventorAssemblyDocument = ThisApplication.ActiveDocument + If oInventorAssemblyDocument.SelectSet.Count <> 0 Then + oSelectSet = oInventorAssemblyDocument.SelectSet(1) + End If + '在零件中 + ElseIf ThisApplication.ActiveDocument.DocumentType = DocumentTypeEnum.kPartDocumentObject Then + If oInventorPartDocument.SelectSet.Count <> 0 Then + oSelectSet = oInventorPartDocument.SelectSet(1) + End If + End If + + If TypeOf oSelectSet Is DimensionConstraint Then + oDimensionConstraint = oSelectSet + strDimensionConstraintName = oDimensionConstraint.Parameter.Name + strDimensionConstraintValue = oDimensionConstraint.Parameter.Expression + + Me.Text = "编辑尺寸:" & strDimensionConstraintName + txt参数一.Text = strDimensionConstraintValue + + Select Case oDimensionConstraint.Parameter.Units + Case "mm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 10 - 50 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 10 + 50 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 10 + + Case "cm" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value - 5 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value + 5 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value + Case "deg" + TrackBar参数一.Minimum = oDimensionConstraint.Parameter.Value * 180 / Math.PI - 45 + TrackBar参数一.Maximum = oDimensionConstraint.Parameter.Value * 180 / Math.PI + 45 + TrackBar参数一.Value = oDimensionConstraint.Parameter.Value * 180 / Math.PI + End Select + End If + + ' 创建ToolTip控件并设置相关属性 + Dim toolTip As New ToolTip() + toolTip.AutoPopDelay = 0 + toolTip.InitialDelay = 0 + toolTip.ReshowDelay = 500 + toolTip.SetToolTip(btn选择一, "选择一个尺寸") + toolTip.SetToolTip(btn还原, "还原为初始尺寸") + toolTip.SetToolTip(btn确定, "修改为当前尺寸") + + ' 从资源文件中加载图标并设置到Button控件的Image属性中 + btn选择一.Image = My.Resources.选择161632.ToBitmap + btn还原.Image = My.Resources.还原161632.ToBitmap + btn确定.Image = My.Resources.确定161632.ToBitmap + + + + End Sub +End Class diff --git a/Form/frmGetPart.Designer.vb b/Form/frmGetPart.Designer.vb index aa40307e604735d39899ac3f9f9357b6d57d2fc0..c074e2fc68a39edca1e624ced988c6cf745cd9db 100644 --- a/Form/frmGetPart.Designer.vb +++ b/Form/frmGetPart.Designer.vb @@ -167,6 +167,7 @@ Partial Class frmGetPart Me.AcceptButton = Me.btn添加 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.CancelButton = Me.btn关闭 Me.ClientSize = New System.Drawing.Size(461, 378) Me.Controls.Add(Me.btn复制面积) Me.Controls.Add(Me.btn复制质量) diff --git a/Form/frmGetPart.vb b/Form/frmGetPart.vb index f71047cc2598bd302bf353ea4c5c96ed863b847d..30c1a95900c40dbc6d03774347f772d7e3ca9778 100644 --- a/Form/frmGetPart.vb +++ b/Form/frmGetPart.vb @@ -130,7 +130,4 @@ Public Class frmGetPart My.Computer.Clipboard.SetText(txt面积.Text) End Sub - Private Sub frmGetPart_Load(sender As Object, e As EventArgs) Handles MyBase.Load - - End Sub End Class \ No newline at end of file diff --git a/Form/frmImportCodeToBomExcel.Designer.vb b/Form/frmImportCodeToBomExcel.Designer.vb index f840d01dcd4444e3bb57c1f8ba11b506e36062b8..8ec47cb9f8c5064a05487fad06bae0be3e290d18 100644 --- a/Form/frmImportCodeToBomExcel.Designer.vb +++ b/Form/frmImportCodeToBomExcel.Designer.vb @@ -172,6 +172,7 @@ Partial Class frmImportCodeToBomExcel Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "导入ERP编码到Bom表" + Me.TopMost = True Me.ResumeLayout(False) Me.PerformLayout() diff --git a/Form/frmImportCodeToBomExcel.vb b/Form/frmImportCodeToBomExcel.vb index f48986d1c5466af4ff54c7fd173f7f90d3baff78..6012fe7194cb94884149b33c5375f5537015fe20 100644 --- a/Form/frmImportCodeToBomExcel.vb +++ b/Form/frmImportCodeToBomExcel.vb @@ -24,7 +24,7 @@ Public NotInheritable Class frmImportCodeToBomExcel End If btn确定.Enabled = False - 'ThisApplication.Cursor = Cursors.WaitCursor + Me.UseWaitCursor = True intLastLine = txt最后行.Text strDataColumn = cmb查找列.Text @@ -117,6 +117,7 @@ Public NotInheritable Class frmImportCodeToBomExcel MsgBox("写入ERP编码完成!", MsgBoxStyle.OkOnly, "导入ERP编码") + Me.UseWaitCursor = False btn确定.Enabled = True Process.Start(strBomExcelFile) @@ -140,7 +141,4 @@ Public NotInheritable Class frmImportCodeToBomExcel End With End Sub - Private Sub frmImportCodeToBomExcel_Load(sender As Object, e As EventArgs) Handles MyBase.Load - - End Sub End Class \ No newline at end of file diff --git a/Form/frmImportCodeToIam.Designer.vb b/Form/frmImportCodeToIam.Designer.vb index dd6e903e3fdbb303235e14821a588229525bcb9a..d70153478e2a592816f366cb0475bb9dd8b19fbe 100644 --- a/Form/frmImportCodeToIam.Designer.vb +++ b/Form/frmImportCodeToIam.Designer.vb @@ -48,8 +48,8 @@ Partial Class frmImportCodeToIam 'lvw文件列表 ' Me.lvw文件列表.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lvw文件列表.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ch图号, Me.ch名称, Me.ch编码, Me.ch供应商, Me.ch文件名}) Me.lvw文件列表.ContextMenuStrip = Me.ContextMenuStrip右键菜单 Me.lvw文件列表.FullRowSelect = True diff --git a/Form/frmImportCodeToIam.vb b/Form/frmImportCodeToIam.vb index b969a5cafd5c19f48a4a55565c2347dc3fb1558e..42e3801a7ead8beb9dbc13a7a5c337e3732ad8ef 100644 --- a/Form/frmImportCodeToIam.vb +++ b/Form/frmImportCodeToIam.vb @@ -35,14 +35,14 @@ Public Class frmImportCodeToIam oInteraction.Start() oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) - Dim oAssemblyDocument As AssemblyDocument - oAssemblyDocument = oInventorDocument + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument + oInventorAssemblyDocument = oInventorDocument '============================================================================================== '基于bom结构化数据,可跳过参考的文件 ' Set a reference to the BOM Dim oBOM As BOM - oBOM = oAssemblyDocument.ComponentDefinition.BOM + oBOM = oInventorAssemblyDocument.ComponentDefinition.BOM oBOM.StructuredViewEnabled = True oBOM.StructuredViewFirstLevelOnly = False @@ -71,9 +71,12 @@ Public Class frmImportCodeToIam lvw文件列表.EndUpdate() Me.Text = "导入ERP编码 ( 共" & lvw文件列表.Items.Count & "个文件)" + oInteraction.Stop() + btn装载.Enabled = True - 'ThisApplication.Cursor = Cursors.Default + + '============================================================================================== '' 获取所有引用文档 @@ -198,6 +201,7 @@ Public Class frmImportCodeToIam 'PartNum = FindSrtingInSheet(Excel_File_Name, StochNum, Sheet_Name, Table_Array, Col_Index_Num, 0) btn查询.Enabled = False + Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents oInteraction.Start() oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) @@ -248,12 +252,31 @@ Public Class frmImportCodeToIam strFindRange = ColIndexNum & dblMatchRow strFindRangeValue = oWorksheet.Range(strFindRange).Value - If strNowRangeValue <> strFindRangeValue Then + If strNowRangeValue = "" Then '当前erp编码为空值 oListViewItem.SubItems(2).Text = strFindRangeValue oListViewItem.UseItemStyleForSubItems = False oListViewItem.SubItems(2).ForeColor = Drawing.Color.Red Exit For + Else + If strNowRangeValue = strFindRangeValue Then '查询值等于当前值 + Exit For + Else + Me.TopMost = False + If MsgBox(oListViewItem.Text & "(" & strNowRangeValue & ") 查询到新的编码:" & vbCrLf & strFindRangeValue & vbCrLf & "是否替换?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then + oListViewItem.SubItems(2).Text = strFindRangeValue + oListViewItem.UseItemStyleForSubItems = False + oListViewItem.SubItems(2).ForeColor = Drawing.Color.DarkOrange + Me.TopMost = True + Exit For + Else + Me.TopMost = True + Exit For + End If + + End If End If + + End If Next @@ -303,7 +326,7 @@ Public Class frmImportCodeToIam For Each oListViewItem As ListViewItem In lvw文件列表.Items - If oListViewItem.SubItems(2).ForeColor = Drawing.Color.Red Then + If oListViewItem.SubItems(2).ForeColor = Drawing.Color.Red Or oListViewItem.SubItems(2).ForeColor = Drawing.Color.DarkOrange Then oListViewItem.SubItems(2).ForeColor = Drawing.Color.Black '写入后变为黑色 strERPCoding = oListViewItem.SubItems(2).Text strInventorFullFileName = oListViewItem.SubItems(4).Text diff --git a/Form/frmInputBox.vb b/Form/frmInputBox.vb index a5e544d15a52a0e4e92f5884ed59720ea2cf9b52..da21fa86a881f54f958b7bd2997b53babafd65d9 100644 --- a/Form/frmInputBox.vb +++ b/Form/frmInputBox.vb @@ -16,7 +16,7 @@ Public Class frmInputBox End Sub Private Sub frmInputBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load - txt输入.Focus() + txt输入.SelectAll() End Sub Private Sub btn复制_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn复制.Click diff --git a/Form/frmMassiPoperties.Designer.vb b/Form/frmMassiPoperties.Designer.vb index 29dd29492cd80f54b7d78678658227f024a917d7..d1f0a1562f64bf279cdc8f4a46d599ae170ba82c 100644 --- a/Form/frmMassiPoperties.Designer.vb +++ b/Form/frmMassiPoperties.Designer.vb @@ -270,7 +270,7 @@ Partial Class frmMassiPoperties Me.tab1.Size = New System.Drawing.Size(294, 172) Me.tab1.TabIndex = 19 ' - 'frmiPoperties + 'frmMassiPoperties ' Me.AcceptButton = Me.btn开始 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) @@ -287,10 +287,11 @@ Partial Class frmMassiPoperties Me.ImeMode = System.Windows.Forms.ImeMode.Off Me.MaximizeBox = False Me.MinimizeBox = False - Me.Name = "frmiPoperties" + Me.Name = "frmMassiPoperties" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "量产iProperty" + Me.TopMost = True Me.tp自定义.ResumeLayout(False) Me.tp自定义.PerformLayout() Me.tp项目.ResumeLayout(False) diff --git a/Form/frmOption.Designer.vb b/Form/frmOption.Designer.vb index a987a542d3009159d4c63a365eaba3b096ab515e..c0cc656e4495f3fde36dc2c9084000e6379d31e1 100644 --- a/Form/frmOption.Designer.vb +++ b/Form/frmOption.Designer.vb @@ -75,6 +75,7 @@ Partial Class frmOption Me.txt图框模板文件 = New System.Windows.Forms.TextBox() Me.lbl模板工程图 = New System.Windows.Forms.Label() Me.GroupBoxERP查询 = New System.Windows.Forms.GroupBox() + Me.btn选择erp数据库 = New System.Windows.Forms.Button() Me.btn更新数据库 = New System.Windows.Forms.Button() Me.btn打开erp数据库 = New System.Windows.Forms.Button() Me.txt查询列 = New System.Windows.Forms.TextBox() @@ -90,7 +91,6 @@ Partial Class frmOption Me.cbo添加 = New System.Windows.Forms.ComboBox() Me.txtBOM导出项 = New System.Windows.Forms.TextBox() Me.lblBOM导出项目 = New System.Windows.Forms.Label() - Me.btn选择erp数据库 = New System.Windows.Forms.Button() Me.TabControl.SuspendLayout() Me.TabPage常规.SuspendLayout() Me.GroupBox快速打印.SuspendLayout() @@ -663,6 +663,15 @@ Partial Class frmOption Me.GroupBoxERP查询.TabStop = False Me.GroupBoxERP查询.Text = "ERP查询" ' + 'btn选择erp数据库 + ' + Me.btn选择erp数据库.Location = New System.Drawing.Point(518, 16) + Me.btn选择erp数据库.Name = "btn选择erp数据库" + Me.btn选择erp数据库.Size = New System.Drawing.Size(52, 25) + Me.btn选择erp数据库.TabIndex = 19 + Me.btn选择erp数据库.Text = "选择" + Me.btn选择erp数据库.UseVisualStyleBackColor = True + ' 'btn更新数据库 ' Me.btn更新数据库.Location = New System.Drawing.Point(423, 51) @@ -775,7 +784,7 @@ Partial Class frmOption ' Me.cbo添加.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.cbo添加.FormattingEnabled = True - Me.cbo添加.Items.AddRange(New Object() {"|", "材料", "空格", "库存编号", "零件代号", "成本中心", "描述", "数量", "所属装配", "所属装配代号", "文件路径", "文件名", "质量", "面积", "总数量", "供应商"}) + Me.cbo添加.Items.AddRange(New Object() {"| (分隔符)", "材料", "成本中心", "供应商", "空格", "库存编号", "零件代号", "面积", "描述", "数量", "所属装配", "所属装配代号", "文件路径", "文件名", "质量", "总数量", "总质量"}) Me.cbo添加.Location = New System.Drawing.Point(335, 50) Me.cbo添加.Name = "cbo添加" Me.cbo添加.Size = New System.Drawing.Size(170, 20) @@ -798,15 +807,6 @@ Partial Class frmOption Me.lblBOM导出项目.TabIndex = 4 Me.lblBOM导出项目.Text = "BOM导出项目:" ' - 'btn选择erp数据库 - ' - Me.btn选择erp数据库.Location = New System.Drawing.Point(518, 16) - Me.btn选择erp数据库.Name = "btn选择erp数据库" - Me.btn选择erp数据库.Size = New System.Drawing.Size(52, 25) - Me.btn选择erp数据库.TabIndex = 19 - Me.btn选择erp数据库.Text = "选择" - Me.btn选择erp数据库.UseVisualStyleBackColor = True - ' 'frmOption ' Me.AcceptButton = Me.btn确定 @@ -825,6 +825,7 @@ Partial Class frmOption Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "应用程序选项" + Me.TopMost = True Me.TabControl.ResumeLayout(False) Me.TabPage常规.ResumeLayout(False) Me.GroupBox快速打印.ResumeLayout(False) diff --git a/Form/frmOption.vb b/Form/frmOption.vb index 9e6c043f253492a62398938e312ce4ed42f98322..af0738966988d53ce18a2347a56967b24f1d378f 100644 --- a/Form/frmOption.vb +++ b/Form/frmOption.vb @@ -11,6 +11,11 @@ Public Class frmOption '//先获取复制文本 Dim newstr As String = cbo添加.Text + If newstr = "| (分隔符)" Then + newstr = "|" + End If + + '//获取textBox2 中的光标 Dim index As Integer = txtBOM导出项.SelectionStart txtBOM导出项.Text = txtBOM导出项.Text.Insert(index, newstr) diff --git a/Form/frmPlayer.Designer.vb b/Form/frmPlayer.Designer.vb index 30d7be3d93005d1a90bdb6e57185e7a77f44416a..61805b76d5ee09883c6428c9b8e5100c0ddc596c 100644 --- a/Form/frmPlayer.Designer.vb +++ b/Form/frmPlayer.Designer.vb @@ -42,6 +42,7 @@ Partial Class frmPlayer Me.btn确定编辑 = New System.Windows.Forms.Button() Me.btn预览 = New System.Windows.Forms.Button() Me.btn选择约束 = New System.Windows.Forms.Button() + Me.ch运动 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader) Me.SuspendLayout() ' 'btn添加 @@ -71,7 +72,7 @@ Partial Class frmPlayer Me.lvw文件列表.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.lvw文件列表.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ch约束名称, Me.ch抑制, Me.ch开始, Me.ch结束, Me.ch步长, Me.ch延时}) + Me.lvw文件列表.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ch约束名称, Me.ch抑制, Me.ch运动, Me.ch开始, Me.ch结束, Me.ch步长, Me.ch延时}) Me.lvw文件列表.FullRowSelect = True Me.lvw文件列表.Location = New System.Drawing.Point(12, 55) Me.lvw文件列表.Name = "lvw文件列表" @@ -210,6 +211,10 @@ Partial Class frmPlayer Me.btn选择约束.Text = "选择约束" Me.btn选择约束.UseVisualStyleBackColor = True ' + 'ch运动 + ' + Me.ch运动.Text = "运动" + ' 'frmPlayer ' Me.AcceptButton = Me.btn添加 @@ -263,5 +268,6 @@ Partial Class frmPlayer Friend WithEvents btn确定编辑 As System.Windows.Forms.Button Friend WithEvents btn预览 As System.Windows.Forms.Button Friend WithEvents btn选择约束 As System.Windows.Forms.Button + Friend WithEvents ch运动 As System.Windows.Forms.ColumnHeader End Class diff --git a/Form/frmPlayer.vb b/Form/frmPlayer.vb index 520147a94f4dd4211ebe8be89259bf69f872d7b7..ff9a18a1e12c51cac7e5ad3ee7e68811225b1044 100644 --- a/Form/frmPlayer.vb +++ b/Form/frmPlayer.vb @@ -31,24 +31,36 @@ Public Class frmPlayer oInventorAssemblyDocument = oInventorDocument - ThisApplication.CommandManager.Pick(kMateConstraintObject, "选择一个约束") - For Each constrt As Object In oInventorAssemblyDocument.SelectSet - Select Case constrt.type + Dim oselect As Object + Dim oAssemblyConstraint As AssemblyConstraint = Nothing + + If oInventorAssemblyDocument.SelectSet.Count <> 0 Then + 'For Each oSelect As Object In InventorDoc.SelectSet + oselect = oInventorAssemblyDocument.SelectSet(1) + Select Case oselect.type Case kAngleConstraintObject, kAssemblySymmetryConstraintObject, kCompositeConstraintObject, kCustomConstraintObject, _ kFlushConstraintObject, kInsertConstraintObject, kMateConstraintObject, kTangentConstraintObject, kTransitionalConstraintObject - - Dim oAssemblyConstraint As AssemblyConstraint - oAssemblyConstraint = constrt - - btn选择约束.Text = oAssemblyConstraint.Name - txt开始.Text = oAssemblyConstraint.DriveSettings.StartValue - txt结束.Text = oAssemblyConstraint.DriveSettings.EndValue - txt步长.Text = oAssemblyConstraint.DriveSettings.FrameRate + oAssemblyConstraint = oselect Case Else - MsgBox("请选择一个约束。") + MsgBox("选择一个约束。") + Exit Sub End Select - Next + Else + MsgBox("选择一个约束。") + Exit Sub + End If + + + If oAssemblyConstraint Is Nothing Then '取消选择 + Exit Sub + End If + + btn选择约束.Text = oAssemblyConstraint.Name + txt开始.Text = oAssemblyConstraint.DriveSettings.StartValue + txt结束.Text = oAssemblyConstraint.DriveSettings.EndValue + txt步长.Text = oAssemblyConstraint.DriveSettings.FrameRate + txt延时.Text = oAssemblyConstraint.DriveSettings.PauseDelay IsAddNew = True @@ -78,28 +90,26 @@ Public Class frmPlayer Dim oInventorAssemblyDocument As Inventor.AssemblyDocument oInventorAssemblyDocument = ThisApplication.ActiveDocument - Dim lvItem As ListViewItem - lvItem = lvw文件列表.SelectedItems(0) + 'Dim lvItem As ListViewItem + 'lvItem = lvw文件列表.SelectedItems(0) - If lvItem Is Nothing Then - Exit Sub - End If + 'If lvItem Is Nothing Then + ' Exit Sub + 'End If Dim oAssemblyConstraint As AssemblyConstraint For Each oAssemblyConstraint In oInventorAssemblyDocument.ComponentDefinition.Constraints - If oAssemblyConstraint.Name = lvItem.Text Then + If oAssemblyConstraint.Name = btn选择约束.Text Then With oAssemblyConstraint.DriveSettings .StartValue = txt开始.Text.ToString .EndValue = txt结束.Text.ToString + .PauseDelay = txt延时.Text.ToString .GoToStart() .PlayForward() .PlayReverse() End With - - - Exit Sub End If @@ -111,30 +121,29 @@ Public Class frmPlayer Dim oInventorAssemblyDocument As Inventor.AssemblyDocument oInventorAssemblyDocument = ThisApplication.ActiveDocument - Dim lvItem As ListViewItem - lvItem = lvw文件列表.SelectedItems(0) - - If lvItem Is Nothing Then - Exit Sub - End If Dim oAssemblyConstraint As AssemblyConstraint - For Each oAssemblyConstraint In oInventorAssemblyDocument.ComponentDefinition.Constraints - If oAssemblyConstraint.Name = lvItem.Text Then - With oAssemblyConstraint.DriveSettings - .StartValue = txt开始.Text.ToString - .EndValue = txt结束.Text.ToString - .GoToStart() - .PlayForward() - .PlayReverse() - End With + For Each lvItem As ListViewItem In lvw文件列表.Items + For Each oAssemblyConstraint In oInventorAssemblyDocument.ComponentDefinition.Constraints + If oAssemblyConstraint.Name = lvItem.Text Then - - Exit Sub - End If + If lvItem.SubItems(1).Text = True Then + oAssemblyConstraint.Suppressed = True + Else + With oAssemblyConstraint.DriveSettings + .StartValue = txt开始.Text.ToString + .EndValue = txt结束.Text.ToString + .PauseDelay = txt延时.Text.ToString + .GoToStart() + .PlayForward() + .PlayReverse() + End With + End If + End If + Next Next End Sub @@ -143,7 +152,6 @@ Public Class frmPlayer Dim oListViewItem As ListViewItem If IsAddNew = True Then - oListViewItem = lvw文件列表.Items.Add(btn选择约束.Text) With oListViewItem .SubItems.Add(CheckBox抑制.Checked) @@ -172,6 +180,30 @@ Public Class frmPlayer Dim oInventorAssemblyDocument As Inventor.AssemblyDocument oInventorAssemblyDocument = ThisApplication.ActiveDocument + Dim oselect As Object + Dim oAssemblyConstraint As AssemblyConstraint = Nothing + + If oInventorAssemblyDocument.SelectSet.Count <> 0 Then + 'For Each oSelect As Object In InventorDoc.SelectSet + oselect = oInventorAssemblyDocument.SelectSet(1) + Select Case oselect.type + Case kAngleConstraintObject, kAssemblySymmetryConstraintObject, kCompositeConstraintObject, kCustomConstraintObject, _ + kFlushConstraintObject, kInsertConstraintObject, kMateConstraintObject, kTangentConstraintObject, kTransitionalConstraintObject + oAssemblyConstraint = oselect + Case Else + MsgBox("选择一个约束。") + Exit Sub + End Select + Else + MsgBox("选择一个约束。") + Exit Sub + End If + + 'If oAssemblyConstraint Is Nothing Then '取消选择 + ' Exit Sub + 'End If + + btn选择约束.Text = oAssemblyConstraint.Name 'Dim oComponentOccurrence As ComponentOccurrence '选择的部件或零件 @@ -214,33 +246,27 @@ Public Class frmPlayer ' End Select 'Next - Dim oselect As Object - Dim oAssemblyConstraint As AssemblyConstraint = Nothing - - If oInventorAssemblyDocument.SelectSet.Count <> 0 Then - 'For Each oSelect As Object In InventorDoc.SelectSet - oselect = oInventorAssemblyDocument.SelectSet(1) - Select Case oselect.type - Case kAngleConstraintObject, kAssemblySymmetryConstraintObject, kCompositeConstraintObject, kCustomConstraintObject, _ - kFlushConstraintObject, kInsertConstraintObject, kMateConstraintObject, kTangentConstraintObject, kTransitionalConstraintObject - oAssemblyConstraint = oselect - Case Else + End Sub + Private Sub lvw文件列表_Click(sender As Object, e As EventArgs) Handles lvw文件列表.Click + Dim oListViewItem As ListViewItem + oListViewItem = lvw文件列表.SelectedItems(0) + With oListViewItem + btn选择约束.Text = .Text + Select Case .SubItems(1).Text + Case "True" + CheckBox抑制.Checked = True + Case "False" + CheckBox抑制.Checked = False End Select + txt开始.Text = .SubItems(2).Text + txt结束.Text = .SubItems(3).Text + txt步长.Text = .SubItems(4).Text + txt延时.Text = .SubItems(5).Text + End With - 'Next - Else - oAssemblyConstraint = ThisApplication.CommandManager.Pick( kFlushConstraintObject, "选择约束") - - End If - - If oAssemblyConstraint Is Nothing Then '取消选择 - Exit Sub - End If - - btn选择约束.Text = oAssemblyConstraint.Name End Sub diff --git a/Form/frmPrint.Designer.vb b/Form/frmPrint.Designer.vb index 53be8491eb9031fc1d9fe72907b3923126908049..9a3903a8282ba4e859b9d920f0675d4930a790fc 100644 --- a/Form/frmPrint.Designer.vb +++ b/Form/frmPrint.Designer.vb @@ -31,6 +31,7 @@ Partial Class frmPrint Me.btn添加文件夹 = New System.Windows.Forms.Button() Me.lbl建议 = New System.Windows.Forms.Label() Me.grp选项 = New System.Windows.Forms.GroupBox() + Me.btn保存配置 = New System.Windows.Forms.Button() Me.chk关闭窗口 = New System.Windows.Forms.CheckBox() Me.chk刷新工程图 = New System.Windows.Forms.CheckBox() Me.chk保存工程图 = New System.Windows.Forms.CheckBox() @@ -124,6 +125,7 @@ Partial Class frmPrint 'grp选项 ' Me.grp选项.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Me.grp选项.Controls.Add(Me.btn保存配置) Me.grp选项.Controls.Add(Me.chk关闭窗口) Me.grp选项.Controls.Add(Me.chk刷新工程图) Me.grp选项.Controls.Add(Me.chk保存工程图) @@ -145,6 +147,15 @@ Partial Class frmPrint Me.grp选项.TabStop = False Me.grp选项.Text = "选项" ' + 'btn保存配置 + ' + Me.btn保存配置.Location = New System.Drawing.Point(723, 37) + Me.btn保存配置.Name = "btn保存配置" + Me.btn保存配置.Size = New System.Drawing.Size(86, 28) + Me.btn保存配置.TabIndex = 47 + Me.btn保存配置.Text = "保存配置" + Me.btn保存配置.UseVisualStyleBackColor = True + ' 'chk关闭窗口 ' Me.chk关闭窗口.AutoSize = True @@ -154,7 +165,7 @@ Partial Class frmPrint Me.chk关闭窗口.Name = "chk关闭窗口" Me.chk关闭窗口.Size = New System.Drawing.Size(72, 16) Me.chk关闭窗口.TabIndex = 46 - Me.chk关闭窗口.Text = "关闭窗口" + Me.chk关闭窗口.Text = "退出打印" Me.chk关闭窗口.UseVisualStyleBackColor = True ' 'chk刷新工程图 @@ -319,8 +330,8 @@ Partial Class frmPrint Me.lvw文件列表.AllowColumnReorder = True Me.lvw文件列表.AllowDrop = True Me.lvw文件列表.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lvw文件列表.AutoArrange = False Me.lvw文件列表.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader文件名}) Me.lvw文件列表.ContextMenuStrip = Me.cms右键菜单 @@ -342,24 +353,24 @@ Partial Class frmPrint ' Me.cms右键菜单.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsmi移出, Me.tsmi筛选移出, Me.tsmi筛选保留}) Me.cms右键菜单.Name = "cmsRemove" - Me.cms右键菜单.Size = New System.Drawing.Size(153, 92) + Me.cms右键菜单.Size = New System.Drawing.Size(125, 70) ' 'tsmi移出 ' Me.tsmi移出.Name = "tsmi移出" - Me.tsmi移出.Size = New System.Drawing.Size(152, 22) + Me.tsmi移出.Size = New System.Drawing.Size(124, 22) Me.tsmi移出.Text = "移出" ' 'tsmi筛选移出 ' Me.tsmi筛选移出.Name = "tsmi筛选移出" - Me.tsmi筛选移出.Size = New System.Drawing.Size(152, 22) + Me.tsmi筛选移出.Size = New System.Drawing.Size(124, 22) Me.tsmi筛选移出.Text = "筛选移出" ' 'tsmi筛选保留 ' Me.tsmi筛选保留.Name = "tsmi筛选保留" - Me.tsmi筛选保留.Size = New System.Drawing.Size(152, 22) + Me.tsmi筛选保留.Size = New System.Drawing.Size(124, 22) Me.tsmi筛选保留.Text = "筛选保留" ' 'btn导入当前部件 @@ -434,5 +445,6 @@ Partial Class frmPrint Friend WithEvents chk刷新工程图 As System.Windows.Forms.CheckBox Friend WithEvents chk保存工程图 As System.Windows.Forms.CheckBox Friend WithEvents chk关闭窗口 As System.Windows.Forms.CheckBox + Friend WithEvents btn保存配置 As System.Windows.Forms.Button End Class diff --git a/Form/frmPrint.resx b/Form/frmPrint.resx index 19ab94a33a6a8da4f67e1ab1c355e43088258a74..f2ea99de79ad68d58f7ce6c6e8daf91322891411 100644 --- a/Form/frmPrint.resx +++ b/Form/frmPrint.resx @@ -121,7 +121,7 @@ 17, 17 - 28 + 45 diff --git a/Form/frmPrint.vb b/Form/frmPrint.vb index 188e00f14ae0b6f2cb7d0bd96b6d0e927ddc697b..f31ad29ee584ab6027b4bf68215cb4ff4f1b8eb0 100644 --- a/Form/frmPrint.vb +++ b/Form/frmPrint.vb @@ -8,6 +8,7 @@ Imports System.Collections.ObjectModel Imports System.Drawing Imports System.IO Imports System.Windows.Forms +Imports System.Xml Public Class frmPrint @@ -22,6 +23,10 @@ Public Class frmPrint btn开始.Enabled = False + Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents + oInteraction.Start() + oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) + Dim strPrinterName As String = "" strPrinterName = cmb打印机.Text @@ -46,16 +51,17 @@ Public Class frmPrint ' GoTo 999 'End If - Me.TopMost = False + 'Me.TopMost = False + Dim oInventorDrawingDocument As Inventor.DrawingDocument '打开工程图 oInventorDrawingDocument = ThisApplication.Documents.Open(strInventorDrawingFullFileName, True) - Me.TopMost = True + 'Me.TopMost = True '刷新sheets If chk刷新工程图.Checked = True Then - SetStatusBarText("正在更新工程图 ......") + SetStatusBarText("正在更新工程图 ...") oInventorDrawingDocument.Rebuild() End If @@ -79,19 +85,11 @@ Public Class frmPrint '打印文件 PrintDrawing(oInventorDrawingDocument, strPrinterName, chk打印为黑色.Checked, nud份数.Value, chk匹配A3.Checked) - Me.TopMost = False + 'Me.TopMost = False Dim strIdwFullFileName As String strIdwFullFileName = oInventorDrawingDocument.FullFileName - '另存为pdf - If chk存为pdf.Checked = True Then - Dim strPdfFullFileName As String 'pdf文件全文件名 - strPdfFullFileName = GetChangeExtension(strIdwFullFileName, DWG) - IdwSaveAsDwgSub(strIdwFullFileName, strPdfFullFileName) - IdwSaveAsPdfSub(strIdwFullFileName, PDF) - End If - '另存为pdf If chk存为pdf.Checked = True Then Dim strPdfFullFileName As String 'pdf文件全文件名 @@ -124,6 +122,9 @@ Public Class frmPrint 'MsgBox("批量打印工程图完成", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "批量打印") btn开始.Enabled = True + + oInteraction.Stop() + SetStatusBarText("批量打印工程图完成") Me.DialogResult = System.Windows.Forms.DialogResult.Cancel @@ -242,38 +243,56 @@ Public Class frmPrint End If Next - If IsSign = 1 Then - chk签字.Checked = True - Else - chk签字.Checked = False - End If - - If IsPaperA3 = 1 Then - chk匹配A3.Checked = True - Else - chk匹配A3.Checked = False - End If + 'If IsSign = 1 Then + ' chk签字.Checked = True + 'Else + ' chk签字.Checked = False + 'End If + + 'If IsPaperA3 = 1 Then + ' chk匹配A3.Checked = True + 'Else + ' chk匹配A3.Checked = False + 'End If + + 'Select Case SaveAsDawAndPdf + ' Case "不另存" + ' chk存为dwg.Checked = False + ' chk存为pdf.Checked = False + ' Case "另存为dwg" + ' chk存为dwg.Checked = True + ' chk存为pdf.Checked = False + ' Case "另存为pdf" + ' chk存为dwg.Checked = False + ' chk存为pdf.Checked = True + ' Case "另存为dwg和pdf" + ' chk存为dwg.Checked = True + ' chk存为pdf.Checked = True + 'End Select + + + Dim binaryArray(PrintSetting.Length - 1) As String + + For i As Integer = 0 To PrintSetting.Length - 1 + binaryArray(i) = Strings.Mid(PrintSetting, i + 1, 1) + Next - Select Case SaveAsDawAndPdf - Case "不另存" - chk存为dwg.Checked = False - chk存为pdf.Checked = False - Case "另存为dwg" - chk存为dwg.Checked = True - chk存为pdf.Checked = False - Case "另存为pdf" - chk存为dwg.Checked = False - chk存为pdf.Checked = True - Case "另存为dwg和pdf" - chk存为dwg.Checked = True - chk存为pdf.Checked = True - End Select + chk匹配A3.Checked = IntToBool(binaryArray(0)) + chk签字.Checked = IntToBool(binaryArray(1)) + chk刷新工程图.Checked = IntToBool(binaryArray(2)) + chk存为pdf.Checked = IntToBool(binaryArray(3)) + chk关闭窗口.Checked = IntToBool(binaryArray(4)) + chk打印为黑色.Checked = IntToBool(binaryArray(5)) + chk打印后关闭.Checked = IntToBool(binaryArray(6)) + chk保存签字.Checked = IntToBool(binaryArray(7)) + chk保存工程图.Checked = IntToBool(binaryArray(8)) + chk存为dwg.Checked = IntToBool(binaryArray(9)) End Sub Private Sub btn从部件导入_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn从部件导入.Click Dim oOpenFileDialog As New OpenFileDialog - Dim oAssemblyDocument As Inventor.AssemblyDocument = Nothing + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument = Nothing lbl建议.Visible = False @@ -284,7 +303,7 @@ Public Class frmPrint .FileName = "" If .ShowDialog = Windows.Forms.DialogResult.OK Then '如果打开窗口OK If .FileName <> "" Then '如果有选中文件 - oAssemblyDocument = ThisApplication.Documents.Open(.FileName) + oInventorAssemblyDocument = ThisApplication.Documents.Open(.FileName) End If Else Exit Sub @@ -322,7 +341,7 @@ Public Class frmPrint '基于bom结构化数据,可跳过参考的文件 ' Set a reference to the BOM Dim oBOM As BOM - oBOM = oAssemblyDocument.ComponentDefinition.BOM + oBOM = oInventorAssemblyDocument.ComponentDefinition.BOM oBOM.StructuredViewEnabled = True 'Set a reference to the "Structured" BOMView @@ -535,14 +554,14 @@ Public Class frmPrint Exit Sub End If - Dim oAssemblyDocument As AssemblyDocument - oAssemblyDocument = oInventorDocument + Dim oInventorAssemblyDocument As AssemblyDocument + oInventorAssemblyDocument = oInventorDocument '=================================== '基于bom结构化数据,可跳过参考的文件 ' Set a reference to the BOM Dim oBOM As BOM - oBOM = oAssemblyDocument.ComponentDefinition.BOM + oBOM = oInventorAssemblyDocument.ComponentDefinition.BOM oBOM.StructuredViewEnabled = True 'Set a reference to the "Structured" BOMView @@ -631,4 +650,12 @@ Public Class frmPrint e.Effect = DragDropEffects.All End If End Sub + + Private Sub btn保存配置_Click(sender As Object, e As EventArgs) Handles btn保存配置.Click + PrintSetting = BoolToInt(chk匹配A3.Checked) & BoolToInt(chk签字.Checked) & BoolToInt(chk刷新工程图.Checked) & _ + BoolToInt(chk存为pdf.Checked) & BoolToInt(chk关闭窗口.Checked) & BoolToInt(chk打印为黑色.Checked) & _ + BoolToInt(chk打印后关闭.Checked) & BoolToInt(chk保存签字.Checked) & BoolToInt(chk保存工程图.Checked) & BoolToInt(chk存为dwg.Checked) + + InAISettingXmlWriteSetting() + End Sub End Class \ No newline at end of file diff --git a/Form/frmQuitOpen.Designer.vb b/Form/frmQuitOpen.Designer.vb index fd24acb95ad8a798a05f7ab414e996b5a5c6f6f2..35ebfbe6710c3bb1afe43a37ea0a5fea726d22de 100644 --- a/Form/frmQuitOpen.Designer.vb +++ b/Form/frmQuitOpen.Designer.vb @@ -75,6 +75,7 @@ Partial Class frmQuitOpen Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "快速打开" + Me.TopMost = True Me.ResumeLayout(False) End Sub diff --git a/Form/frmQuitOpen.vb b/Form/frmQuitOpen.vb index 1dc0a99078711f5f4284b9001db053581faddddf..4442cf4ac5f4ff611225b60b0ff9ad773912e6ac 100644 --- a/Form/frmQuitOpen.vb +++ b/Form/frmQuitOpen.vb @@ -27,7 +27,4 @@ Public Class frmQuitOpen Me.Dispose() End Sub - Private Sub frmQuitOpen_Load(sender As Object, e As EventArgs) Handles MyBase.Load - - End Sub End Class \ No newline at end of file diff --git a/Form/frmSaveAll.Designer.vb b/Form/frmSaveAll.Designer.vb index b92b27e859babb8aab792e60ebe8459ceba728cb..8c896e20c25ddaa8d1b90047fbd75cbfa1180735 100644 --- a/Form/frmSaveAll.Designer.vb +++ b/Form/frmSaveAll.Designer.vb @@ -167,6 +167,7 @@ Partial Class frmSaveAll Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "全部保存" + Me.TopMost = True Me.grp文件类型.ResumeLayout(False) Me.grp文件类型.PerformLayout() Me.grp执行操作.ResumeLayout(False) diff --git a/Form/frmSaveAll.vb b/Form/frmSaveAll.vb index 31fc9f05bcea2ead62e9bc387be95679b13107e4..8f2ac7de826c03c26ae4f2582494536b7d76fa17 100644 --- a/Form/frmSaveAll.vb +++ b/Form/frmSaveAll.vb @@ -12,6 +12,8 @@ Public Class frmSaveAll Exit Sub End If + Me.TopMost = False + For Each oInventorDocument As Inventor.Document In ThisApplication.Documents.VisibleDocuments If IsFileExsts(oInventorDocument.FullDocumentName) = False Then Continue For @@ -78,7 +80,4 @@ Public Class frmSaveAll RadioState = 3 End Sub - Private Sub frmSaveAll_Load(sender As Object, e As EventArgs) Handles MyBase.Load - - End Sub End Class \ No newline at end of file diff --git a/Form/frmSaveAs.Designer.vb b/Form/frmSaveAs.Designer.vb index c4e9444c19854fb68f735d02d26c638155468537..3f6d9123edfa3f4220f1b5752c34ec670a8e0f50 100644 --- a/Form/frmSaveAs.Designer.vb +++ b/Form/frmSaveAs.Designer.vb @@ -225,6 +225,7 @@ Partial Class frmSaveAs Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "批量另存" + Me.TopMost = True Me.ResumeLayout(False) Me.PerformLayout() diff --git a/Form/frmSaveAs.vb b/Form/frmSaveAs.vb index d5b1226605a14e5e9602c7e1714135426dc2e669..74a427642a4307ba6daa40dad2eac95aee374a16 100644 --- a/Form/frmSaveAs.vb +++ b/Form/frmSaveAs.vb @@ -24,8 +24,9 @@ Public Class frmSaveAs Exit Sub End If - 'btnStart.Enabled = False - 'ThisApplication.Cursor = Cursors.WaitCursor + Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents + oInteraction.Start() + oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) For i = 0 To lvw文件列表.Items.Count - 1 '当前项标记颜色 @@ -108,9 +109,11 @@ Public Class frmSaveAs 999: Next + oInteraction.Stop() + MsgBox("批量另存完成。", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "批量另存") - 'btnStart.Enabled = True - 'ThisApplication.Cursor = Cursors.WaitCursor + + End Sub @@ -196,10 +199,16 @@ Public Class frmSaveAs strExtension = IDW End If + Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents + oInteraction.Start() + oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) + GetAllFile(strPresentFolder, strDestinationFolder, lvw文件列表, strExtension) + oInteraction.Stop() btn添加文件夹.Enabled = True - 'ThisApplication.Cursor = Cursors.Default + + End Sub '当前文件夹 diff --git a/Form/frmSearchERPCode.Designer.vb b/Form/frmSearchERPCode.Designer.vb index 768176f722865dcd0caa26fc2ee5ed363061ce1d..a9d2e60a90ce2c269b915e817c3fdf415d408d03 100644 --- a/Form/frmSearchERPCode.Designer.vb +++ b/Form/frmSearchERPCode.Designer.vb @@ -156,6 +156,7 @@ Partial Class frmSearchERPCode Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "查询ERP编码" + Me.TopMost = True Me.ResumeLayout(False) Me.PerformLayout() diff --git a/Form/frmSearchERPCode.vb b/Form/frmSearchERPCode.vb index 41fba3cf8305a177122c4bab1b8aec9196a58bdb..b3e60d6e0371a91dac936c31a819c4e77ea42f0b 100644 --- a/Form/frmSearchERPCode.vb +++ b/Form/frmSearchERPCode.vb @@ -31,8 +31,12 @@ Public NotInheritable Class frmSearchERPCode Dim arraystrERPCode() As String + 'Me.UseWaitCursor = True + arraystrERPCode = FindAllSrtingInSheet(BasicExcelFullFileName, strDrawingNo, TableArrays, ColIndexNum, 0) + 'Me.UseWaitCursor = False + If arraystrERPCode(0) Is Nothing Then txtERP编码.Text = "未查询到ERP编码。" btn查询编码.Enabled = True diff --git a/Form/frmSetWriteOnly.Designer.vb b/Form/frmSetWriteOnly.Designer.vb index 7d33a3472bb475f672f295eebf28060836b5000f..8cfabe85249c7a81d25ef1a46d24116e3e1f0273 100644 --- a/Form/frmSetWriteOnly.Designer.vb +++ b/Form/frmSetWriteOnly.Designer.vb @@ -193,8 +193,10 @@ Partial Class frmSetWriteOnly ' 'frmSetWriteOnly ' + Me.AcceptButton = Me.btn开始 Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.CancelButton = Me.btn关闭 Me.ClientSize = New System.Drawing.Size(1067, 401) Me.Controls.Add(Me.CheckBox本部件) Me.Controls.Add(Me.CheckBox工程图) @@ -214,6 +216,7 @@ Partial Class frmSetWriteOnly Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "批量只读" + Me.TopMost = True Me.ResumeLayout(False) Me.PerformLayout() diff --git a/Form/frmSetWriteOnly.vb b/Form/frmSetWriteOnly.vb index e28f444e03c2f7ceb9b9d2e6214054e4707d100c..879d044a5c6a3e17a2687b1df929ce2374090928 100644 --- a/Form/frmSetWriteOnly.vb +++ b/Form/frmSetWriteOnly.vb @@ -45,6 +45,7 @@ Public Class frmSetWriteOnly End If Next + btn导入当前部件_Click(sender, e) MsgBox("设置文件属性完成。", MsgBoxStyle.Information + MsgBoxStyle.OkOnly) diff --git a/Form/frmSign.Designer.vb b/Form/frmSign.Designer.vb index a1b366051f410700d19b3994fb615d74b2b092f7..abc8dc5e5fbce42c368fb07e066c154d7e47475d 100644 --- a/Form/frmSign.Designer.vb +++ b/Form/frmSign.Designer.vb @@ -113,6 +113,7 @@ Partial Class frmSign Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = " 签字" + Me.TopMost = True Me.ResumeLayout(False) Me.PerformLayout() diff --git a/Form/frmSpecification.Designer.vb b/Form/frmSpecification.Designer.vb index 11745ba68332442d44fead3baa025c12ccbd4691..6b42264560e840928a256a1bd69a4475b56e6ded 100644 --- a/Form/frmSpecification.Designer.vb +++ b/Form/frmSpecification.Designer.vb @@ -82,7 +82,7 @@ Partial Class frmSpecification 'GroupBox基础数据 ' Me.GroupBox基础数据.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.GroupBox基础数据.Controls.Add(Me.ToolStrip基础数据) Me.GroupBox基础数据.Controls.Add(Me.TreeView基础数据树) Me.GroupBox基础数据.Controls.Add(Me.lst基础数据列表) @@ -157,7 +157,7 @@ Partial Class frmSpecification 'TreeView基础数据树 ' Me.TreeView基础数据树.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.TreeView基础数据树.Location = New System.Drawing.Point(13, 44) Me.TreeView基础数据树.Name = "TreeView基础数据树" Me.TreeView基础数据树.Size = New System.Drawing.Size(141, 151) @@ -166,8 +166,8 @@ Partial Class frmSpecification 'lst基础数据列表 ' Me.lst基础数据列表.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lst基础数据列表.FormattingEnabled = True Me.lst基础数据列表.HorizontalScrollbar = True Me.lst基础数据列表.ItemHeight = 12 @@ -179,7 +179,7 @@ Partial Class frmSpecification 'GroupBox技术要求 ' Me.GroupBox技术要求.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.GroupBox技术要求.Controls.Add(Me.GroupBox导入自定义) Me.GroupBox技术要求.Controls.Add(Me.ToolStrip自定义数据) Me.GroupBox技术要求.Controls.Add(Me.TreeView自定义) @@ -226,8 +226,8 @@ Partial Class frmSpecification 'txt导入文本 ' Me.txt导入文本.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.txt导入文本.Location = New System.Drawing.Point(16, 18) Me.txt导入文本.Multiline = True Me.txt导入文本.Name = "txt导入文本" @@ -394,7 +394,7 @@ Partial Class frmSpecification 'TreeView自定义 ' Me.TreeView自定义.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles) Me.TreeView自定义.Location = New System.Drawing.Point(13, 45) Me.TreeView自定义.Name = "TreeView自定义" Me.TreeView自定义.Size = New System.Drawing.Size(141, 189) @@ -403,8 +403,8 @@ Partial Class frmSpecification 'lst技术要求文本 ' Me.lst技术要求文本.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.lst技术要求文本.FormattingEnabled = True Me.lst技术要求文本.HorizontalScrollbar = True Me.lst技术要求文本.ItemHeight = 12 @@ -448,6 +448,7 @@ Partial Class frmSpecification Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "技术要求" + Me.TopMost = True Me.GroupBox基础数据.ResumeLayout(False) Me.GroupBox基础数据.PerformLayout() Me.ToolStrip基础数据.ResumeLayout(False) diff --git a/Form/frmSpecification.vb b/Form/frmSpecification.vb index 02119d6aac5af8147501c070b39dcbaf6b63800f..b72eaee73332c7e3d2565cccdb10603d9b799a84 100644 --- a/Form/frmSpecification.vb +++ b/Form/frmSpecification.vb @@ -95,11 +95,13 @@ Public Class frmSpecification Private Sub 添加自定义ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 添加自定义ToolStripButton.Click Dim strChildNodeValue As String + Me.TopMost = False strChildNodeValue = InputBox("输入技术要求。 ", "技术要求") If strChildNodeValue <> "" Then lst技术要求文本.Items.Add(strChildNodeValue) boolIsUserChange = True End If + Me.TopMost = True End Sub Private Sub 修改自定义ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 修改自定义ToolStripButton.Click @@ -110,12 +112,13 @@ Public Class frmSpecification Else Exit Sub End If - + Me.TopMost = False strChildNodeValue = InputBox("输入技术要求。 ", "技术要求", strChildNodeValue) If strChildNodeValue <> "" Then lst技术要求文本.Items(lst技术要求文本.SelectedIndex) = strChildNodeValue boolIsUserChange = True End If + Me.TopMost = True End Sub Private Sub 保存基础数据ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 保存基础数据ToolStripButton.Click @@ -143,10 +146,11 @@ Public Class frmSpecification Private Sub 修改基础数据ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 修改基础数据ToolStripButton.Click Dim strChildNodeValue As String - + Me.TopMost = False If lst基础数据列表.SelectedItems.Count <> 0 Then strChildNodeValue = lst基础数据列表.SelectedItems(0).ToString Else + Me.TopMost = True Exit Sub End If @@ -155,6 +159,7 @@ Public Class frmSpecification lst基础数据列表.Items(lst基础数据列表.SelectedIndex) = strChildNodeValue boolIsBasicChange = True End If + Me.TopMost = True End Sub Private Sub 删除基础数据ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 删除基础数据ToolStripButton.Click @@ -166,11 +171,14 @@ Public Class frmSpecification Private Sub 添加基础数据ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 添加基础数据ToolStripButton.Click Dim strChildNodeValue As String + + Me.TopMost = False strChildNodeValue = InputBox("输入技术要求。 ", "技术要求") If strChildNodeValue <> "" Then lst基础数据列表.Items.Add(strChildNodeValue) boolIsBasicChange = True End If + Me.TopMost = True End Sub Private Sub 保存自定义ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 保存自定义ToolStripButton.Click @@ -246,6 +254,8 @@ Public Class frmSpecification Private Sub 新建自定义ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 新建自定义ToolStripButton.Click Dim strChildNodeName As String + Me.TopMost = False + strChildNodeName = InputBox("输入新技术要求名称!", "技术要求") If strChildNodeName <> "" Then @@ -273,6 +283,9 @@ Public Class frmSpecification boolIsUserChange = False End If + + Me.TopMost = True + End Sub Private Sub 自动编号ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 自动编号ToolStripMenuItem.Click @@ -328,7 +341,7 @@ Public Class frmSpecification oInventorDocument = ThisApplication.ActiveDocument If oInventorDocument.DocumentType <> kDrawingDocumentObject Then - MsgBox("该功能仅适用于工程图", MsgBoxStyle.Information, "添加Φ") + MsgBox("该功能仅适用于工程图", MsgBoxStyle.Information) Exit Sub End If diff --git a/Form/frmain.Designer.vb b/Form/frmain.Designer.vb index 2679b580ad8abfd7ca444d876aa9249080a2b0f6..d244bd7115cfd723996c4d5fa7aba41f9f1d5b1a 100644 --- a/Form/frmain.Designer.vb +++ b/Form/frmain.Designer.vb @@ -61,6 +61,9 @@ Partial Class frmain Me.生成图号ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.设置虚拟件ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.设置只读ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.标准件可见性ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.替换为库文件ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.编辑尺寸ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.工程图ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.对称件IProToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.替换图框ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -101,12 +104,13 @@ Partial Class frmain Me.量产iPropertyToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.刷新引用ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.统计面积质量ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.动画设计ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.关于ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.帮助ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.Button1 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.ButtoniProperty = New System.Windows.Forms.Button() - Me.动画设计ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.生成展开图ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.StatusStrip1.SuspendLayout() Me.MenuStrip1.SuspendLayout() Me.SuspendLayout() @@ -180,7 +184,7 @@ Partial Class frmain Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.文件ToolStripMenuItem, Me.零部件ToolStripMenuItem, Me.工程图ToolStripMenuItem, Me.尺寸ToolStripMenuItem, Me.序号ToolStripMenuItem, Me.签字ToolStripMenuItem, Me.打印ToolStripMenuItem, Me.ERPToolStripMenuItem, Me.工具ToolStripMenuItem, Me.关于ToolStripMenuItem}) Me.MenuStrip1.Location = New System.Drawing.Point(0, 0) Me.MenuStrip1.Name = "MenuStrip1" - Me.MenuStrip1.Size = New System.Drawing.Size(536, 25) + Me.MenuStrip1.Size = New System.Drawing.Size(536, 26) Me.MenuStrip1.TabIndex = 17 Me.MenuStrip1.Text = "MenuStrip1" ' @@ -188,421 +192,445 @@ Partial Class frmain ' Me.文件ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.快速打开ToolStripMenuItem, Me.保存关闭ToolStripMenuItem, Me.关闭ToolStripMenuItem, Me.打开文件所在文件夹ToolStripMenuItem, Me.保存关闭所有文件ToolStripMenuItem, Me.ToolStripSeparator1, Me.退出ToolStripMenuItem}) Me.文件ToolStripMenuItem.Name = "文件ToolStripMenuItem" - Me.文件ToolStripMenuItem.Size = New System.Drawing.Size(44, 21) + Me.文件ToolStripMenuItem.Size = New System.Drawing.Size(46, 22) Me.文件ToolStripMenuItem.Text = "文件" ' '快速打开ToolStripMenuItem ' Me.快速打开ToolStripMenuItem.Name = "快速打开ToolStripMenuItem" - Me.快速打开ToolStripMenuItem.Size = New System.Drawing.Size(184, 22) + Me.快速打开ToolStripMenuItem.Size = New System.Drawing.Size(193, 22) Me.快速打开ToolStripMenuItem.Text = "快速打开" ' '保存关闭ToolStripMenuItem ' Me.保存关闭ToolStripMenuItem.Name = "保存关闭ToolStripMenuItem" - Me.保存关闭ToolStripMenuItem.Size = New System.Drawing.Size(184, 22) + Me.保存关闭ToolStripMenuItem.Size = New System.Drawing.Size(193, 22) Me.保存关闭ToolStripMenuItem.Text = "保存关闭" ' '关闭ToolStripMenuItem ' Me.关闭ToolStripMenuItem.Name = "关闭ToolStripMenuItem" - Me.关闭ToolStripMenuItem.Size = New System.Drawing.Size(184, 22) + Me.关闭ToolStripMenuItem.Size = New System.Drawing.Size(193, 22) Me.关闭ToolStripMenuItem.Text = "关闭" ' '打开文件所在文件夹ToolStripMenuItem ' Me.打开文件所在文件夹ToolStripMenuItem.Name = "打开文件所在文件夹ToolStripMenuItem" - Me.打开文件所在文件夹ToolStripMenuItem.Size = New System.Drawing.Size(184, 22) + Me.打开文件所在文件夹ToolStripMenuItem.Size = New System.Drawing.Size(193, 22) Me.打开文件所在文件夹ToolStripMenuItem.Text = "打开文件所在文件夹" ' '保存关闭所有文件ToolStripMenuItem ' Me.保存关闭所有文件ToolStripMenuItem.Name = "保存关闭所有文件ToolStripMenuItem" - Me.保存关闭所有文件ToolStripMenuItem.Size = New System.Drawing.Size(184, 22) + Me.保存关闭所有文件ToolStripMenuItem.Size = New System.Drawing.Size(193, 22) Me.保存关闭所有文件ToolStripMenuItem.Text = "保存关闭所有文件" ' 'ToolStripSeparator1 ' Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(181, 6) + Me.ToolStripSeparator1.Size = New System.Drawing.Size(190, 6) ' '退出ToolStripMenuItem ' Me.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem" - Me.退出ToolStripMenuItem.Size = New System.Drawing.Size(184, 22) + Me.退出ToolStripMenuItem.Size = New System.Drawing.Size(193, 22) Me.退出ToolStripMenuItem.Text = "退出" ' '零部件ToolStripMenuItem ' - Me.零部件ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.打开工程图ToolStripMenuItem, Me.检查是否有工程图ToolStripMenuItem, Me.打开指定工程图ToolStripMenuItem, Me.ToolStripSeparator3, Me.查找缺失部件ToolStripMenuItem, Me.距离对齐ToolStripMenuItem, Me.对齐原始坐标面ToolStripMenuItem, Me.移动指定文件ToolStripMenuItem, Me.ToolStripSeparator4, Me.提取iproperty更改文件名ToolStripMenuItem, Me.批量替换文件名ToolStripMenuItem, Me.随机颜色ToolStripMenuItem, Me.全部可见ToolStripMenuItem, Me.生成图号ToolStripMenuItem, Me.设置虚拟件ToolStripMenuItem, Me.设置只读ToolStripMenuItem}) + Me.零部件ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.打开工程图ToolStripMenuItem, Me.检查是否有工程图ToolStripMenuItem, Me.打开指定工程图ToolStripMenuItem, Me.ToolStripSeparator3, Me.查找缺失部件ToolStripMenuItem, Me.距离对齐ToolStripMenuItem, Me.对齐原始坐标面ToolStripMenuItem, Me.移动指定文件ToolStripMenuItem, Me.ToolStripSeparator4, Me.提取iproperty更改文件名ToolStripMenuItem, Me.批量替换文件名ToolStripMenuItem, Me.随机颜色ToolStripMenuItem, Me.全部可见ToolStripMenuItem, Me.生成图号ToolStripMenuItem, Me.设置虚拟件ToolStripMenuItem, Me.设置只读ToolStripMenuItem, Me.标准件可见性ToolStripMenuItem, Me.替换为库文件ToolStripMenuItem, Me.编辑尺寸ToolStripMenuItem, Me.生成展开图ToolStripMenuItem}) Me.零部件ToolStripMenuItem.Name = "零部件ToolStripMenuItem" - Me.零部件ToolStripMenuItem.Size = New System.Drawing.Size(56, 21) + Me.零部件ToolStripMenuItem.Size = New System.Drawing.Size(59, 22) Me.零部件ToolStripMenuItem.Text = "零部件" ' '打开工程图ToolStripMenuItem ' Me.打开工程图ToolStripMenuItem.Name = "打开工程图ToolStripMenuItem" - Me.打开工程图ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.打开工程图ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.打开工程图ToolStripMenuItem.Text = "打开工程图" ' '检查是否有工程图ToolStripMenuItem ' Me.检查是否有工程图ToolStripMenuItem.Name = "检查是否有工程图ToolStripMenuItem" - Me.检查是否有工程图ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.检查是否有工程图ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.检查是否有工程图ToolStripMenuItem.Text = "检查是否有工程图" ' '打开指定工程图ToolStripMenuItem ' Me.打开指定工程图ToolStripMenuItem.Name = "打开指定工程图ToolStripMenuItem" - Me.打开指定工程图ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.打开指定工程图ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.打开指定工程图ToolStripMenuItem.Text = "打开指定工程图" ' 'ToolStripSeparator3 ' Me.ToolStripSeparator3.Name = "ToolStripSeparator3" - Me.ToolStripSeparator3.Size = New System.Drawing.Size(211, 6) + Me.ToolStripSeparator3.Size = New System.Drawing.Size(220, 6) ' '查找缺失部件ToolStripMenuItem ' Me.查找缺失部件ToolStripMenuItem.Name = "查找缺失部件ToolStripMenuItem" - Me.查找缺失部件ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.查找缺失部件ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.查找缺失部件ToolStripMenuItem.Text = "查找缺失文件" ' '距离对齐ToolStripMenuItem ' Me.距离对齐ToolStripMenuItem.Name = "距离对齐ToolStripMenuItem" - Me.距离对齐ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.距离对齐ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.距离对齐ToolStripMenuItem.Text = "距离对齐" ' '对齐原始坐标面ToolStripMenuItem ' Me.对齐原始坐标面ToolStripMenuItem.Name = "对齐原始坐标面ToolStripMenuItem" - Me.对齐原始坐标面ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.对齐原始坐标面ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.对齐原始坐标面ToolStripMenuItem.Text = "对齐原始坐标面" ' '移动指定文件ToolStripMenuItem ' Me.移动指定文件ToolStripMenuItem.Name = "移动指定文件ToolStripMenuItem" - Me.移动指定文件ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.移动指定文件ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.移动指定文件ToolStripMenuItem.Text = "移动指定文件" ' 'ToolStripSeparator4 ' Me.ToolStripSeparator4.Name = "ToolStripSeparator4" - Me.ToolStripSeparator4.Size = New System.Drawing.Size(211, 6) + Me.ToolStripSeparator4.Size = New System.Drawing.Size(220, 6) ' '提取iproperty更改文件名ToolStripMenuItem ' Me.提取iproperty更改文件名ToolStripMenuItem.Name = "提取iproperty更改文件名ToolStripMenuItem" - Me.提取iproperty更改文件名ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.提取iproperty更改文件名ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.提取iproperty更改文件名ToolStripMenuItem.Text = "提取iproperty更改文件名" ' '批量替换文件名ToolStripMenuItem ' Me.批量替换文件名ToolStripMenuItem.Name = "批量替换文件名ToolStripMenuItem" - Me.批量替换文件名ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.批量替换文件名ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.批量替换文件名ToolStripMenuItem.Text = "批量替换文件名" ' '随机颜色ToolStripMenuItem ' Me.随机颜色ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.设置随机颜色ToolStripMenuItem, Me.清除颜色ToolStripMenuItem}) Me.随机颜色ToolStripMenuItem.Name = "随机颜色ToolStripMenuItem" - Me.随机颜色ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.随机颜色ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.随机颜色ToolStripMenuItem.Text = "随机颜色" ' '设置随机颜色ToolStripMenuItem ' Me.设置随机颜色ToolStripMenuItem.Name = "设置随机颜色ToolStripMenuItem" - Me.设置随机颜色ToolStripMenuItem.Size = New System.Drawing.Size(124, 22) + Me.设置随机颜色ToolStripMenuItem.Size = New System.Drawing.Size(128, 22) Me.设置随机颜色ToolStripMenuItem.Text = "设置颜色" ' '清除颜色ToolStripMenuItem ' Me.清除颜色ToolStripMenuItem.Name = "清除颜色ToolStripMenuItem" - Me.清除颜色ToolStripMenuItem.Size = New System.Drawing.Size(124, 22) + Me.清除颜色ToolStripMenuItem.Size = New System.Drawing.Size(128, 22) Me.清除颜色ToolStripMenuItem.Text = "清除颜色" ' '全部可见ToolStripMenuItem ' Me.全部可见ToolStripMenuItem.Name = "全部可见ToolStripMenuItem" - Me.全部可见ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.全部可见ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.全部可见ToolStripMenuItem.Text = "全部可见" ' '生成图号ToolStripMenuItem ' Me.生成图号ToolStripMenuItem.Name = "生成图号ToolStripMenuItem" - Me.生成图号ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.生成图号ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.生成图号ToolStripMenuItem.Text = "生成图号" ' '设置虚拟件ToolStripMenuItem ' Me.设置虚拟件ToolStripMenuItem.Name = "设置虚拟件ToolStripMenuItem" - Me.设置虚拟件ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.设置虚拟件ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.设置虚拟件ToolStripMenuItem.Text = "设置虚拟件" ' '设置只读ToolStripMenuItem ' Me.设置只读ToolStripMenuItem.Name = "设置只读ToolStripMenuItem" - Me.设置只读ToolStripMenuItem.Size = New System.Drawing.Size(214, 22) + Me.设置只读ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) Me.设置只读ToolStripMenuItem.Text = "设置只读" ' + '标准件可见性ToolStripMenuItem + ' + Me.标准件可见性ToolStripMenuItem.Name = "标准件可见性ToolStripMenuItem" + Me.标准件可见性ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) + Me.标准件可见性ToolStripMenuItem.Text = "标准件可见" + ' + '替换为库文件ToolStripMenuItem + ' + Me.替换为库文件ToolStripMenuItem.Name = "替换为库文件ToolStripMenuItem" + Me.替换为库文件ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) + Me.替换为库文件ToolStripMenuItem.Text = "替换为库文件" + ' + '编辑尺寸ToolStripMenuItem + ' + Me.编辑尺寸ToolStripMenuItem.Name = "编辑尺寸ToolStripMenuItem" + Me.编辑尺寸ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) + Me.编辑尺寸ToolStripMenuItem.Text = "编辑尺寸" + ' '工程图ToolStripMenuItem ' Me.工程图ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.对称件IProToolStripMenuItem, Me.替换图框ToolStripMenuItem, Me.技术要求ToolStripMenuItem, Me.另存为PDFToolStripMenuItem, Me.另存为DWGToolStripMenuItem, Me.另存为STPToolStripMenuItem}) Me.工程图ToolStripMenuItem.Name = "工程图ToolStripMenuItem" - Me.工程图ToolStripMenuItem.Size = New System.Drawing.Size(56, 21) + Me.工程图ToolStripMenuItem.Size = New System.Drawing.Size(59, 22) Me.工程图ToolStripMenuItem.Text = "工程图" ' '对称件IProToolStripMenuItem ' Me.对称件IProToolStripMenuItem.Name = "对称件IProToolStripMenuItem" - Me.对称件IProToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.对称件IProToolStripMenuItem.Size = New System.Drawing.Size(146, 22) Me.对称件IProToolStripMenuItem.Text = "对称件IPro" ' '替换图框ToolStripMenuItem ' Me.替换图框ToolStripMenuItem.Name = "替换图框ToolStripMenuItem" - Me.替换图框ToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.替换图框ToolStripMenuItem.Size = New System.Drawing.Size(146, 22) Me.替换图框ToolStripMenuItem.Text = "替换图框" ' '技术要求ToolStripMenuItem ' Me.技术要求ToolStripMenuItem.Name = "技术要求ToolStripMenuItem" - Me.技术要求ToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.技术要求ToolStripMenuItem.Size = New System.Drawing.Size(146, 22) Me.技术要求ToolStripMenuItem.Text = "技术要求" ' '另存为PDFToolStripMenuItem ' Me.另存为PDFToolStripMenuItem.Name = "另存为PDFToolStripMenuItem" - Me.另存为PDFToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.另存为PDFToolStripMenuItem.Size = New System.Drawing.Size(146, 22) Me.另存为PDFToolStripMenuItem.Text = "另存为PDF" ' '另存为DWGToolStripMenuItem ' Me.另存为DWGToolStripMenuItem.Name = "另存为DWGToolStripMenuItem" - Me.另存为DWGToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.另存为DWGToolStripMenuItem.Size = New System.Drawing.Size(146, 22) Me.另存为DWGToolStripMenuItem.Text = "另存为DWG" ' '另存为STPToolStripMenuItem ' Me.另存为STPToolStripMenuItem.Name = "另存为STPToolStripMenuItem" - Me.另存为STPToolStripMenuItem.Size = New System.Drawing.Size(152, 22) + Me.另存为STPToolStripMenuItem.Size = New System.Drawing.Size(146, 22) Me.另存为STPToolStripMenuItem.Text = "另存为STP" ' '尺寸ToolStripMenuItem ' Me.尺寸ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.添加直径ToolStripMenuItem, Me.尺寸圆整ToolStripMenuItem, Me.尺寸居中ToolStripMenuItem, Me.全部居中ToolStripMenuItem}) Me.尺寸ToolStripMenuItem.Name = "尺寸ToolStripMenuItem" - Me.尺寸ToolStripMenuItem.Size = New System.Drawing.Size(44, 21) + Me.尺寸ToolStripMenuItem.Size = New System.Drawing.Size(46, 22) Me.尺寸ToolStripMenuItem.Text = "尺寸" ' '添加直径ToolStripMenuItem ' Me.添加直径ToolStripMenuItem.Name = "添加直径ToolStripMenuItem" - Me.添加直径ToolStripMenuItem.Size = New System.Drawing.Size(124, 22) + Me.添加直径ToolStripMenuItem.Size = New System.Drawing.Size(128, 22) Me.添加直径ToolStripMenuItem.Text = "添加直径" ' '尺寸圆整ToolStripMenuItem ' Me.尺寸圆整ToolStripMenuItem.Name = "尺寸圆整ToolStripMenuItem" - Me.尺寸圆整ToolStripMenuItem.Size = New System.Drawing.Size(124, 22) + Me.尺寸圆整ToolStripMenuItem.Size = New System.Drawing.Size(128, 22) Me.尺寸圆整ToolStripMenuItem.Text = "尺寸圆整" ' '尺寸居中ToolStripMenuItem ' Me.尺寸居中ToolStripMenuItem.Name = "尺寸居中ToolStripMenuItem" - Me.尺寸居中ToolStripMenuItem.Size = New System.Drawing.Size(124, 22) + Me.尺寸居中ToolStripMenuItem.Size = New System.Drawing.Size(128, 22) Me.尺寸居中ToolStripMenuItem.Text = "尺寸居中" ' '全部居中ToolStripMenuItem ' Me.全部居中ToolStripMenuItem.Name = "全部居中ToolStripMenuItem" - Me.全部居中ToolStripMenuItem.Size = New System.Drawing.Size(124, 22) + Me.全部居中ToolStripMenuItem.Size = New System.Drawing.Size(128, 22) Me.全部居中ToolStripMenuItem.Text = "全部居中" ' '序号ToolStripMenuItem ' Me.序号ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.检查序号完整性ToolStripMenuItem, Me.新建序号ToolStripMenuItem, Me.自动重建序号ToolStripMenuItem, Me.重写BOM序号ToolStripMenuItem}) Me.序号ToolStripMenuItem.Name = "序号ToolStripMenuItem" - Me.序号ToolStripMenuItem.Size = New System.Drawing.Size(44, 21) + Me.序号ToolStripMenuItem.Size = New System.Drawing.Size(46, 22) Me.序号ToolStripMenuItem.Text = "序号" ' '检查序号完整性ToolStripMenuItem ' Me.检查序号完整性ToolStripMenuItem.Name = "检查序号完整性ToolStripMenuItem" - Me.检查序号完整性ToolStripMenuItem.Size = New System.Drawing.Size(160, 22) + Me.检查序号完整性ToolStripMenuItem.Size = New System.Drawing.Size(167, 22) Me.检查序号完整性ToolStripMenuItem.Text = "检查序号完整性" ' '新建序号ToolStripMenuItem ' Me.新建序号ToolStripMenuItem.Name = "新建序号ToolStripMenuItem" - Me.新建序号ToolStripMenuItem.Size = New System.Drawing.Size(160, 22) + Me.新建序号ToolStripMenuItem.Size = New System.Drawing.Size(167, 22) Me.新建序号ToolStripMenuItem.Text = "新建序号" ' '自动重建序号ToolStripMenuItem ' Me.自动重建序号ToolStripMenuItem.Name = "自动重建序号ToolStripMenuItem" - Me.自动重建序号ToolStripMenuItem.Size = New System.Drawing.Size(160, 22) + Me.自动重建序号ToolStripMenuItem.Size = New System.Drawing.Size(167, 22) Me.自动重建序号ToolStripMenuItem.Text = "自动重建序号" ' '重写BOM序号ToolStripMenuItem ' Me.重写BOM序号ToolStripMenuItem.Name = "重写BOM序号ToolStripMenuItem" - Me.重写BOM序号ToolStripMenuItem.Size = New System.Drawing.Size(160, 22) + Me.重写BOM序号ToolStripMenuItem.Size = New System.Drawing.Size(167, 22) Me.重写BOM序号ToolStripMenuItem.Text = "重写BOM序号" ' '签字ToolStripMenuItem ' Me.签字ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.签字ToolStripMenuItem1, Me.清除签字ToolStripMenuItem, Me.自定义签字ToolStripMenuItem}) Me.签字ToolStripMenuItem.Name = "签字ToolStripMenuItem" - Me.签字ToolStripMenuItem.Size = New System.Drawing.Size(44, 21) + Me.签字ToolStripMenuItem.Size = New System.Drawing.Size(46, 22) Me.签字ToolStripMenuItem.Text = "签字" ' '签字ToolStripMenuItem1 ' Me.签字ToolStripMenuItem1.Name = "签字ToolStripMenuItem1" - Me.签字ToolStripMenuItem1.Size = New System.Drawing.Size(136, 22) + Me.签字ToolStripMenuItem1.Size = New System.Drawing.Size(141, 22) Me.签字ToolStripMenuItem1.Text = "签字" ' '清除签字ToolStripMenuItem ' Me.清除签字ToolStripMenuItem.Name = "清除签字ToolStripMenuItem" - Me.清除签字ToolStripMenuItem.Size = New System.Drawing.Size(136, 22) + Me.清除签字ToolStripMenuItem.Size = New System.Drawing.Size(141, 22) Me.清除签字ToolStripMenuItem.Text = "清除签字" ' '自定义签字ToolStripMenuItem ' Me.自定义签字ToolStripMenuItem.Name = "自定义签字ToolStripMenuItem" - Me.自定义签字ToolStripMenuItem.Size = New System.Drawing.Size(136, 22) + Me.自定义签字ToolStripMenuItem.Size = New System.Drawing.Size(141, 22) Me.自定义签字ToolStripMenuItem.Text = "自定义签字" ' '打印ToolStripMenuItem ' Me.打印ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.快速打印ToolStripMenuItem, Me.批量打印ToolStripMenuItem}) Me.打印ToolStripMenuItem.Name = "打印ToolStripMenuItem" - Me.打印ToolStripMenuItem.Size = New System.Drawing.Size(44, 21) + Me.打印ToolStripMenuItem.Size = New System.Drawing.Size(46, 22) Me.打印ToolStripMenuItem.Text = "打印" ' '快速打印ToolStripMenuItem ' Me.快速打印ToolStripMenuItem.Name = "快速打印ToolStripMenuItem" - Me.快速打印ToolStripMenuItem.Size = New System.Drawing.Size(124, 22) + Me.快速打印ToolStripMenuItem.Size = New System.Drawing.Size(128, 22) Me.快速打印ToolStripMenuItem.Text = "快速打印" ' '批量打印ToolStripMenuItem ' Me.批量打印ToolStripMenuItem.Name = "批量打印ToolStripMenuItem" - Me.批量打印ToolStripMenuItem.Size = New System.Drawing.Size(124, 22) + Me.批量打印ToolStripMenuItem.Size = New System.Drawing.Size(128, 22) Me.批量打印ToolStripMenuItem.Text = "批量打印" ' 'ERPToolStripMenuItem ' Me.ERPToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.查询ERP编码ToolStripMenuItem, Me.ERP反查ToolStripMenuItem, Me.ToolStripSeparator2, Me.导出BOM平面性ToolStripMenuItem, Me.导入ERPToolStripMenuItem, Me.导入ERP到BOMToolStripMenuItem, Me.打开数据文件ToolStripMenuItem}) Me.ERPToolStripMenuItem.Name = "ERPToolStripMenuItem" - Me.ERPToolStripMenuItem.Size = New System.Drawing.Size(42, 21) + Me.ERPToolStripMenuItem.Size = New System.Drawing.Size(44, 22) Me.ERPToolStripMenuItem.Text = "ERP" ' '查询ERP编码ToolStripMenuItem ' Me.查询ERP编码ToolStripMenuItem.Name = "查询ERP编码ToolStripMenuItem" - Me.查询ERP编码ToolStripMenuItem.Size = New System.Drawing.Size(164, 22) + Me.查询ERP编码ToolStripMenuItem.Size = New System.Drawing.Size(168, 22) Me.查询ERP编码ToolStripMenuItem.Text = "查询ERP编码" ' 'ERP反查ToolStripMenuItem ' Me.ERP反查ToolStripMenuItem.Name = "ERP反查ToolStripMenuItem" - Me.ERP反查ToolStripMenuItem.Size = New System.Drawing.Size(164, 22) + Me.ERP反查ToolStripMenuItem.Size = New System.Drawing.Size(168, 22) Me.ERP反查ToolStripMenuItem.Text = "ERP反查" ' 'ToolStripSeparator2 ' Me.ToolStripSeparator2.Name = "ToolStripSeparator2" - Me.ToolStripSeparator2.Size = New System.Drawing.Size(161, 6) + Me.ToolStripSeparator2.Size = New System.Drawing.Size(165, 6) ' '导出BOM平面性ToolStripMenuItem ' Me.导出BOM平面性ToolStripMenuItem.Name = "导出BOM平面性ToolStripMenuItem" - Me.导出BOM平面性ToolStripMenuItem.Size = New System.Drawing.Size(164, 22) + Me.导出BOM平面性ToolStripMenuItem.Size = New System.Drawing.Size(168, 22) Me.导出BOM平面性ToolStripMenuItem.Text = "导出BOM" ' '导入ERPToolStripMenuItem ' Me.导入ERPToolStripMenuItem.Name = "导入ERPToolStripMenuItem" - Me.导入ERPToolStripMenuItem.Size = New System.Drawing.Size(164, 22) + Me.导入ERPToolStripMenuItem.Size = New System.Drawing.Size(168, 22) Me.导入ERPToolStripMenuItem.Text = "导入ERP编码" ' '导入ERP到BOMToolStripMenuItem ' Me.导入ERP到BOMToolStripMenuItem.Name = "导入ERP到BOMToolStripMenuItem" - Me.导入ERP到BOMToolStripMenuItem.Size = New System.Drawing.Size(164, 22) + Me.导入ERP到BOMToolStripMenuItem.Size = New System.Drawing.Size(168, 22) Me.导入ERP到BOMToolStripMenuItem.Text = "导入ERP到BOM" ' '打开数据文件ToolStripMenuItem ' Me.打开数据文件ToolStripMenuItem.Name = "打开数据文件ToolStripMenuItem" - Me.打开数据文件ToolStripMenuItem.Size = New System.Drawing.Size(164, 22) + Me.打开数据文件ToolStripMenuItem.Size = New System.Drawing.Size(168, 22) Me.打开数据文件ToolStripMenuItem.Text = "打开数据文件" ' '工具ToolStripMenuItem ' Me.工具ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.设置ToolStripMenuItem, Me.工程图批量另存为ToolStripMenuItem, Me.还原旧图ToolStripMenuItem, Me.清理旧版文件ToolStripMenuItem, Me.量产iPropertyToolStripMenuItem, Me.刷新引用ToolStripMenuItem, Me.统计面积质量ToolStripMenuItem, Me.动画设计ToolStripMenuItem}) Me.工具ToolStripMenuItem.Name = "工具ToolStripMenuItem" - Me.工具ToolStripMenuItem.Size = New System.Drawing.Size(44, 21) + Me.工具ToolStripMenuItem.Size = New System.Drawing.Size(46, 22) Me.工具ToolStripMenuItem.Text = "工具" ' '设置ToolStripMenuItem ' Me.设置ToolStripMenuItem.Name = "设置ToolStripMenuItem" - Me.设置ToolStripMenuItem.Size = New System.Drawing.Size(172, 22) + Me.设置ToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.设置ToolStripMenuItem.Text = "设置" ' '工程图批量另存为ToolStripMenuItem ' Me.工程图批量另存为ToolStripMenuItem.Name = "工程图批量另存为ToolStripMenuItem" - Me.工程图批量另存为ToolStripMenuItem.Size = New System.Drawing.Size(172, 22) + Me.工程图批量另存为ToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.工程图批量另存为ToolStripMenuItem.Text = "工程图批量另存为" ' '还原旧图ToolStripMenuItem ' Me.还原旧图ToolStripMenuItem.Name = "还原旧图ToolStripMenuItem" - Me.还原旧图ToolStripMenuItem.Size = New System.Drawing.Size(172, 22) + Me.还原旧图ToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.还原旧图ToolStripMenuItem.Text = "还原旧图" ' '清理旧版文件ToolStripMenuItem ' Me.清理旧版文件ToolStripMenuItem.Name = "清理旧版文件ToolStripMenuItem" - Me.清理旧版文件ToolStripMenuItem.Size = New System.Drawing.Size(172, 22) + Me.清理旧版文件ToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.清理旧版文件ToolStripMenuItem.Text = "清理旧版文件" ' '量产iPropertyToolStripMenuItem ' Me.量产iPropertyToolStripMenuItem.Name = "量产iPropertyToolStripMenuItem" - Me.量产iPropertyToolStripMenuItem.Size = New System.Drawing.Size(172, 22) + Me.量产iPropertyToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.量产iPropertyToolStripMenuItem.Text = "量产iProperty" ' '刷新引用ToolStripMenuItem ' Me.刷新引用ToolStripMenuItem.Name = "刷新引用ToolStripMenuItem" - Me.刷新引用ToolStripMenuItem.Size = New System.Drawing.Size(172, 22) + Me.刷新引用ToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.刷新引用ToolStripMenuItem.Text = "刷新引用" ' '统计面积质量ToolStripMenuItem ' Me.统计面积质量ToolStripMenuItem.Name = "统计面积质量ToolStripMenuItem" - Me.统计面积质量ToolStripMenuItem.Size = New System.Drawing.Size(172, 22) + Me.统计面积质量ToolStripMenuItem.Size = New System.Drawing.Size(180, 22) Me.统计面积质量ToolStripMenuItem.Text = "统计面积质量" ' + '动画设计ToolStripMenuItem + ' + Me.动画设计ToolStripMenuItem.Name = "动画设计ToolStripMenuItem" + Me.动画设计ToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.动画设计ToolStripMenuItem.Text = "动画设计" + ' '关于ToolStripMenuItem ' Me.关于ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.帮助ToolStripMenuItem}) Me.关于ToolStripMenuItem.Name = "关于ToolStripMenuItem" - Me.关于ToolStripMenuItem.Size = New System.Drawing.Size(44, 21) + Me.关于ToolStripMenuItem.Size = New System.Drawing.Size(46, 22) Me.关于ToolStripMenuItem.Text = "关于" ' '帮助ToolStripMenuItem ' Me.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem" - Me.帮助ToolStripMenuItem.Size = New System.Drawing.Size(100, 22) + Me.帮助ToolStripMenuItem.Size = New System.Drawing.Size(102, 22) Me.帮助ToolStripMenuItem.Text = "帮助" ' 'Button1 @@ -634,11 +662,11 @@ Partial Class frmain Me.ButtoniProperty.Text = "iProperty" Me.ButtoniProperty.UseVisualStyleBackColor = True ' - '动画设计ToolStripMenuItem + '生成展开图ToolStripMenuItem ' - Me.动画设计ToolStripMenuItem.Name = "动画设计ToolStripMenuItem" - Me.动画设计ToolStripMenuItem.Size = New System.Drawing.Size(172, 22) - Me.动画设计ToolStripMenuItem.Text = "动画设计" + Me.生成展开图ToolStripMenuItem.Name = "生成展开图ToolStripMenuItem" + Me.生成展开图ToolStripMenuItem.Size = New System.Drawing.Size(223, 22) + Me.生成展开图ToolStripMenuItem.Text = "生成展开图" ' 'frmain ' @@ -753,5 +781,9 @@ Partial Class frmain Friend WithEvents 统计面积质量ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents 设置只读ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem Friend WithEvents 动画设计ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents 标准件可见性ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents 替换为库文件ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents 编辑尺寸ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem + Friend WithEvents 生成展开图ToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem End Class diff --git a/Form/frmain.vb b/Form/frmain.vb index f3573d3b73036989b4bec4a77a6704d46b0ee64a..6c458068fd3662f4794aeb70320c0b37d5978f21 100644 --- a/Form/frmain.vb +++ b/Form/frmain.vb @@ -9,8 +9,6 @@ Imports Microsoft.VisualBasic Imports System.Collections.ObjectModel Imports System.Runtime.InteropServices - - Public Class frmain Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) @@ -22,25 +20,65 @@ Public Class frmain Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click - ' 创建进度条 - Dim progressBar As Inventor.ProgressBar = ThisApplication.CreateProgressBar(True, 10, "Progress Bar Demo") - progressBar.Message = "Processing..." + '' 创建进度条 + 'Dim progressBar As Inventor.ProgressBar = ThisApplication.CreateProgressBar(True, 10, "Progress Bar Demo") + 'progressBar.Message = "Processing..." + + '' 更新进度条 + 'For i = 1 To 10 + ' progressBar.UpdateProgress() + ' System.Threading.Thread.Sleep(1000) + 'Next - ' 更新进度条 - For i = 1 To 10 - progressBar.UpdateProgress() - System.Threading.Thread.Sleep(1000) - Next + '' 隐藏并销毁进度条 + 'progressBar.Close() - ' 隐藏并销毁进度条 - progressBar.Close() + 'Dim oMiniToolbar As clsMiniToolbar = New clsMiniToolbar End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click - AddPanelToToolsTab() - + 'AddPanelToToolsTab() + 'If NewUpdater.GetGitVersion = "New" Then + ' If MsgBox("检查到InAI新版:" & NewVersion & ",是否下载?", MsgBoxStyle.YesNo + MsgBoxStyle.Question, "更新") = MsgBoxResult.Yes Then + ' Process.Start("https://github.com/leaky114/InAI/tree/master/Release") + ' End If + 'End If + '++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + 'On Error Resume Next + 'Dim oCommandManager As CommandManager + 'Dim oUserInterfaceManager As UserInterfaceManager + ''Dim oIPictureDisp32 As Object '大图标 + ''Dim oIPictureDisp8 As Object '小图标 + + 'Dim smallPicture As stdole.IPictureDisp + 'Dim largePicture As stdole.IPictureDisp + + ''Try + 'oCommandManager = ThisApplication.CommandManager + 'oUserInterfaceManager = ThisApplication.UserInterfaceManager + + 'If oUserInterfaceManager.InterfaceStyle = InterfaceStyleEnum.kRibbonInterface Then + ' Dim oRibbon As Inventor.Ribbon + ' Dim oRibbonTab As Inventor.RibbonTab + ' Dim oRibbonPanel As Inventor.RibbonPanel + + ' Dim oButtonDefinitions As Inventor.ObjectCollection + ' oButtonDefinitions = ThisApplication.TransientObjects.CreateObjectCollection + + + + ' '部件环境 + ' oRibbon = oUserInterfaceManager.Ribbons.Item("Assembly") + + ' oRibbonTab = oRibbon.RibbonTabs.Item("id_TabAssemble") + + 'End If + + '++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + End Sub @@ -821,4 +859,38 @@ Public Class frmain MsgBox(ex.Message) End Try End Sub + + Private Sub 标准件可见性ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 标准件可见性ToolStripMenuItem.Click + SetStandIptVisible() + End Sub + + Private Sub 替换为库文件ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 替换为库文件ToolStripMenuItem.Click + ReplaceWithContentCenterFile() + End Sub + + Private Sub 编辑尺寸ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 编辑尺寸ToolStripMenuItem.Click + Try + SetStatusBarText() + + If IsInventorOpenDocument() = False Then + Exit Sub + End If + + + If ThisApplication.ActiveEditDocument.DocumentType <> kPartDocumentObject Then + MsgBox("该功能仅适用于零件。", MsgBoxStyle.Information) + Exit Sub + End If + + Dim frmEditDimension As New frmEditDimension + frmEditDimension.Show() + + Catch ex As Exception + MsgBox(ex.Message) + End Try + End Sub + + Private Sub 生成展开图ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 生成展开图ToolStripMenuItem.Click + CreateFlat() + End Sub End Class \ No newline at end of file diff --git a/Module/BasicFileSystem.vb b/Module/BasicFileSystem.vb index 89b182e09a06d27318f36a44f69f9c1aed17797e..7c81054da0b451382b6ce1312f21962635e30ed7 100644 --- a/Module/BasicFileSystem.vb +++ b/Module/BasicFileSystem.vb @@ -135,7 +135,7 @@ Module BasicFileSystem '重命名(旧文件名,新文件名) Public Function ReFileName(ByVal strOldFullFileName As String, ByVal strNewFullFileName As String) As Boolean If IsFileExsts(strNewFullFileName) = False And IsFileExsts(strOldFullFileName) = True Then - IO.File.Move(strOldFullFileName, GetSingleName(strNewFullFileName)) + System.IO.File.Move(strOldFullFileName, strNewFullFileName) ReFileName = IsFileExsts(strNewFullFileName) Else ReFileName = False diff --git a/Module/Calc.vb b/Module/Calc.vb index 5d642efc4cc8f6c3bdecb4b4d63c0e63ed1073ec..dc8b661e931681347f2a06f9c90feabe8e5a4fae 100644 --- a/Module/Calc.vb +++ b/Module/Calc.vb @@ -26,4 +26,23 @@ 'End Function + '将布尔值转换为整数 + Public Function BoolToInt(ByVal boolValue As Boolean) As Integer + If boolValue Then + Return 1 + Else + Return 0 + End If + End Function + + '将整数转换为布尔值 + Public Function IntToBool(ByVal intValue As Integer) As Boolean + If intValue = 0 Then + Return False + ElseIf intValue = 1 Then + Return True + Else + Throw New ArgumentException("intValue must be 0 or 1") + End If + End Function End Module diff --git a/Module/IamModule.vb b/Module/IamModule.vb index dde81e0d89c776c01ef612932053b054ce8353bb..dd4acfdd396a9e19fd96eb85d3f356bb6e179c1d 100644 --- a/Module/IamModule.vb +++ b/Module/IamModule.vb @@ -41,11 +41,13 @@ Module IamModule 999: With frmInputBox .txt输入.Text = GetPropitem(oInventorAssemblyDocument, Map_DrawingNnumber) + .Text = "检查包号指定字符的工程图" .lbl描述.Text = "输入要检查的部分图号的。" & vbCrLf & "如要检查全部AAA-BBB000下的零件是否有工程图,输入AAA-BBB即可。" .StartPosition = FormStartPosition.CenterScreen - .ShowDialog() strPartDrawingNnumber = .txt输入.Text + .txt输入.SelectAll() + .ShowDialog() End With If (frmInputBox.DialogResult = System.Windows.Forms.DialogResult.OK) And (strPartDrawingNnumber <> "") Then @@ -813,48 +815,7 @@ Module IamModule 'End Try End Sub - '一键全部可见 - Public Sub OneKeyShowAll() - - Try - If IsInventorOpenDocument() = False Then - Exit Sub - End If - - SetStatusBarText() - - If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject Then - MsgBox("该功能仅适用于部件。", MsgBoxStyle.Information) - 'Return False - Exit Sub - End If - - Dim oInventorAssemblyDocument As Inventor.AssemblyDocument - oInventorAssemblyDocument = ThisApplication.ActiveDocument - - '关闭屏幕更新 - ThisApplication.ScreenUpdating = False - - Dim oAsmDocDef As AssemblyComponentDefinition - oAsmDocDef = oInventorAssemblyDocument.ComponentDefinition - - Dim oViewRepper As RepresentationsManager - oViewRepper = oAsmDocDef.RepresentationsManager - - Dim actView As DesignViewRepresentation - actView = oViewRepper.ActiveDesignViewRepresentation - actView.ShowAll() - - '打开屏幕更新 - ThisApplication.ScreenUpdating = True - - '刷新浏览器 - oInventorAssemblyDocument.BrowserPanes.ActivePane.Refresh() - Catch ex As Exception - MsgBox(ex.Message) - End Try - - End Sub + '打开部件中所有子集对应的工程图 ,部件文件,指定的图号 Public Function OpenAllDrwInAsmSub(ByVal oInventorAssemblyDocument As Inventor.AssemblyDocument, ByVal strStockNum As String) As Boolean @@ -1341,8 +1302,9 @@ Module IamModule Case "质量" Dim strMass As String - strMass = GetMass(oInventorDocument) + strMass = GetMass(oInventorDocument).ToString arrColumnsTitleValue(k) = strMass + Case "面积" Dim strArea As String strArea = GetArea(oInventorDocument) @@ -1377,6 +1339,9 @@ Module IamModule 'propitem = oPropertySet.ItemByPropId(Inventor.PropertiesForDesignTrackingPropertiesEnum.kVendorDesignTrackingProperties) 'arrColumnsTitleValue(k) = propitem.Value + Case "总质量" + arrColumnsTitleValue(k) = (GetMass(oInventorDocument) * oBOMRow.ItemQuantity * intPresentNumber).ToString + End Select arrColumnsTitleValue(k) = Strings.Replace(arrColumnsTitleValue(k), ",", ",") Next k @@ -1492,50 +1457,52 @@ Module IamModule '打开指定工程图 Public Sub OpenAllDrwInAsm() - Try - SetStatusBarText() + 'Try + On Error Resume Next - If IsInventorOpenDocument() = False Then - Exit Sub - End If + SetStatusBarText() - If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject Then - MsgBox("该功能仅适用于部件。", MsgBoxStyle.Information) - Exit Sub - End If + If IsInventorOpenDocument() = False Then + Exit Sub + End If - Dim oInventorAssemblyDocument As Inventor.AssemblyDocument - oInventorAssemblyDocument = ThisApplication.ActiveDocument + If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject Then + MsgBox("该功能仅适用于部件。", MsgBoxStyle.Information) + Exit Sub + End If - Dim strPartDrawingNnumber As String -999: - Dim frmInputBox As New frmInputBox - With frmInputBox - .txt输入.Text = GetPropitem(oInventorAssemblyDocument, Map_DrawingNnumber) - .Text = "打开指定工程图" - .lbl描述.Text = "输入包含指定的字段的图号。" & vbCrLf & "如要打开 AAA-BBB000.aim 下的工程图,输入AAA-BBB即可。" - .StartPosition = FormStartPosition.CenterScreen - .ShowDialog() - strPartDrawingNnumber = .txt输入.Text - End With + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument + oInventorAssemblyDocument = ThisApplication.ActiveDocument - If (frmInputBox.DialogResult = System.Windows.Forms.DialogResult.OK) And (strPartDrawingNnumber <> "") Then - If OpenAllDrwInAsmSub(oInventorAssemblyDocument, frmInputBox.txt输入.Text) Then - MsgBox("打开了部件所有子集对应的工程图。", MsgBoxStyle.Information) - Else - SetStatusBarText("错误") - End If - ElseIf frmInputBox.DialogResult = System.Windows.Forms.DialogResult.Cancel Then - Exit Sub + Dim strPartDrawingNnumber As String +999: + Dim frmInputBox As New frmInputBox + With frmInputBox + .txt输入.Text = GetPropitem(oInventorAssemblyDocument, Map_DrawingNnumber) + .Text = "打开指定工程图" + .lbl描述.Text = "输入包含指定的字段的图号。" & vbCrLf & "如要打开 AAA-BBB000.aim 下的工程图,输入AAA-BBB即可。" + .StartPosition = FormStartPosition.CenterScreen + .ShowDialog() + strPartDrawingNnumber = .txt输入.Text + End With + + If (frmInputBox.DialogResult = System.Windows.Forms.DialogResult.OK) And (strPartDrawingNnumber <> "") Then + If OpenAllDrwInAsmSub(oInventorAssemblyDocument, frmInputBox.txt输入.Text) Then + MsgBox("打开了部件所有子集对应的工程图。", MsgBoxStyle.Information) Else - MsgBox("请输入部分图号!", MsgBoxStyle.Information) SetStatusBarText("错误") - GoTo 999 - Exit Sub End If - Catch ex As Exception - MsgBox(ex.Message) - End Try + ElseIf frmInputBox.DialogResult = System.Windows.Forms.DialogResult.Cancel Then + Exit Sub + Else + MsgBox("请输入部分图号!", MsgBoxStyle.Information) + SetStatusBarText("错误") + GoTo 999 + Exit Sub + End If + 'Catch ex As Exception + ' MsgBox(ex.Message) + 'End Try End Sub @@ -2230,4 +2197,443 @@ Module IamModule Return True End Function + + '一键全部可见 + Public Sub OneKeyShowAll() + + Try + If IsInventorOpenDocument() = False Then + Exit Sub + End If + + SetStatusBarText() + + If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject Then + MsgBox("该功能仅适用于部件。", MsgBoxStyle.Information) + 'Return False + Exit Sub + End If + + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument + oInventorAssemblyDocument = ThisApplication.ActiveDocument + + '关闭屏幕更新 + ThisApplication.ScreenUpdating = False + + Dim oAsmDocDef As AssemblyComponentDefinition + oAsmDocDef = oInventorAssemblyDocument.ComponentDefinition + + Dim oViewRepper As RepresentationsManager + oViewRepper = oAsmDocDef.RepresentationsManager + + Dim actView As DesignViewRepresentation + actView = oViewRepper.ActiveDesignViewRepresentation + actView.ShowAll() + + '打开屏幕更新 + ThisApplication.ScreenUpdating = True + + '刷新浏览器 + oInventorAssemblyDocument.BrowserPanes.ActivePane.Refresh() + Catch ex As Exception + MsgBox(ex.Message) + End Try + + + + End Sub + + '设置标准件可见性 + Public Sub SetStandIptVisible() + Try + If IsInventorOpenDocument() = False Then + Exit Sub + End If + + SetStatusBarText() + + If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject Then + MsgBox("该功能仅适用于部件。", MsgBoxStyle.Information) + 'Return False + Exit Sub + End If + + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument + oInventorAssemblyDocument = ThisApplication.ActiveDocument + + '关闭屏幕更新 + 'ThisApplication.ScreenUpdating = False + + Dim oCompocc As ComponentOccurrence + + Dim IsVisible As Boolean + + Select Case MsgBox("设置标准件可见性。" & vbCrLf & vbCrLf & "是——全部可见" & vbCrLf & vbCrLf & "否——全部隐藏", MsgBoxStyle.Information + MsgBoxStyle.YesNoCancel) + Case MsgBoxResult.Yes + IsVisible = True + Case MsgBoxResult.No + IsVisible = False + Case Else + GoTo 999 + End Select + + For Each oCompocc In oInventorAssemblyDocument.ComponentDefinition.Occurrences + If oCompocc.Definition.BOMStructure = kPurchasedBOMStructure Then + oCompocc.Visible = IsVisible + End If + Next + +999: + ''打开屏幕更新 + 'ThisApplication.ScreenUpdating = True + + '刷新浏览器 + oInventorAssemblyDocument.BrowserPanes.ActivePane.Refresh() + + Catch ex As Exception + MsgBox(ex.Message) + End Try + End Sub + + '替换为库文件 + Public Sub ReplaceWithContentCenterFile() + Try + If IsInventorOpenDocument() = False Then + Exit Sub + End If + + SetStatusBarText() + + If ThisApplication.ActiveDocumentType <> kAssemblyDocumentObject Then + MsgBox("该功能仅适用于部件。", MsgBoxStyle.Information) + 'Return False + Exit Sub + End If + + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument + oInventorAssemblyDocument = ThisApplication.ActiveDocument + + '关闭屏幕更新 + 'ThisApplication.ScreenUpdating = False + + '============================================================================================== + '基于bom结构化数据,可跳过参考的文件 + ' Set a reference to the BOM + Dim oBOM As BOM + oBOM = oInventorAssemblyDocument.ComponentDefinition.BOM + oBOM.StructuredViewEnabled = True + oBOM.StructuredViewFirstLevelOnly = True + + 'Set a reference to the "Structured" BOMView + Dim oBOMView As BOMView + + '获取结构化的bom页面 + For Each oBOMView In oBOM.BOMViews + If oBOMView.ViewType = BOMViewTypeEnum.kStructuredBOMViewType Then + '遍历这个bom页面 + + 'Dim i As Integer + 'Dim intStepCount As Integer + 'intStepCount = oBOMView.BOMRows.Count + + Dim oBOMRow As BOMRow '每一行bom + + For Each oBOMRow In oBOMView.BOMRows + + Dim strFullFileName As String + + strFullFileName = oBOMRow.ReferencedFileDescriptor.FullFileName + + '测试文件 + Debug.Print(strFullFileName) + + + SetStatusBarText(strFullFileName) + + If IsFileExsts(strFullFileName) = False Then '跳过不存在的文件 + Continue For + End If + + If InStr(strFullFileName, ContentCenterFiles) > 0 Then '跳过零件库文件 + Continue For + End If + + Dim oFileNameInfo As FileNameInfo + oFileNameInfo = GetFileNameInfo(strFullFileName) + + Dim arrFullFileName As String() + Dim strContentCenterFileFullFileName As String = Nothing + arrFullFileName = Directory.GetFiles(ContentCenterFiles, oFileNameInfo.SigleName, SearchOption.AllDirectories) + + If arrFullFileName.Length <> 0 Then + strContentCenterFileFullFileName = arrFullFileName(0) + + Dim oCompocc As ComponentOccurrence + For Each oCompocc In oInventorAssemblyDocument.ComponentDefinition.Occurrences + If oCompocc.ReferencedDocumentDescriptor.FullDocumentName = strFullFileName Then + oCompocc.Replace(strContentCenterFileFullFileName, False) + End If + Next + End If + + Next + + End If + Next + '============================================================================================== + + + ''打开屏幕更新 + 'ThisApplication.ScreenUpdating = True + + '刷新浏览器 + oInventorAssemblyDocument.BrowserPanes.ActivePane.Refresh() + + MsgBox("替换为库文件完成。", MsgBoxStyle.Information) + + Catch ex As Exception + MsgBox(ex.Message) + End Try + + + End Sub + + + '创建展开图 + Public Sub CreateFlat() + On Error Resume Next + + 'Try + If IsInventorOpenDocument() = False Then + Exit Sub + End If + + SetStatusBarText() + + Dim oInventorDocument As Inventor.Document + Dim oInventorAssemblyDocument As Inventor.AssemblyDocument + Dim oInventorPartDocument As Inventor.PartDocument + + oInventorDocument = ThisApplication.ActiveDocument + + Dim strBasicIdwFileFullName As String + strBasicIdwFileFullName = TitleBlockIdwDoc '工程图模板 + + If IsFileExsts(strBasicIdwFileFullName) = False Then + Dim oOpenFileDialog As New OpenFileDialog '声名新open 窗口 + + MsgBox("未找到工程图模板:" & vbCrLf & strBasicIdwFileFullName & vbCrLf & "请选择工程图模板文件。", MsgBoxStyle.Information + MsgBoxStyle.OkOnly) + + With oOpenFileDialog + .Title = "打开工程图模板文件" + .Filter = "AutoDesk Inventor 工程图 (*.idw)|*.idw" '添加过滤文件 + .Multiselect = False '多开文件打开 + If .ShowDialog = System.Windows.Forms.DialogResult.OK Then '如果打开窗口OK + If .FileName <> "" Then '如果有选中文件 + strBasicIdwFileFullName = .FileName + Else + Exit Sub + End If + Else + Exit Sub + End If + End With + + End If + + Dim strInventorDrawingFolder As String = Nothing + Select Case MsgBox("是否指定保存展开图文件夹?不指定则保存到当前文件夹。", MsgBoxStyle.YesNoCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2) + Case MsgBoxResult.Yes + Dim oFolderBrowserDialog As New FolderBrowserDialog + + With oFolderBrowserDialog + .ShowNewFolderButton = False + .Description = "选择文件夹" + .RootFolder = System.Environment.SpecialFolder.Desktop + If .ShowDialog = DialogResult.OK Then + strInventorDrawingFolder = .SelectedPath + Else + Exit Sub + End If + End With + + Case MsgBoxResult.No + strInventorDrawingFolder = "当前文件夹" + Case MsgBoxResult.Cancel + Exit Sub + End Select + + + Dim IsClose As Boolean + Select Case MsgBox("创建工程图后是否关闭?", MsgBoxStyle.YesNoCancel + MsgBoxStyle.Question + MsgBoxStyle.DefaultButton2) + Case MsgBoxResult.Yes + IsClose = True + Case MsgBoxResult.No + IsClose = False + Case MsgBoxResult.Cancel + Exit Sub + End Select + + Select Case oInventorDocument.DocumentType + Case kAssemblyDocumentObject + + oInventorAssemblyDocument = oInventorDocument + + '============================================================================================== + '基于bom结构化数据,可跳过参考的文件 + ' Set a reference to the BOM + Dim oBOM As BOM + oBOM = oInventorAssemblyDocument.ComponentDefinition.BOM + oBOM.StructuredViewEnabled = True + oBOM.StructuredViewFirstLevelOnly = False + + 'Set a reference to the "Structured" BOMView + Dim oBOMView As BOMView + + '获取结构化的bom页面 + For Each oBOMView In oBOM.BOMViews + If oBOMView.ViewType = BOMViewTypeEnum.kStructuredBOMViewType Then + '遍历这个bom页面 + Dim i As Integer + + Dim intStepCount As Integer + intStepCount = oBOMView.BOMRows.Count + + For i = 1 To intStepCount + ' Get the current row. + Dim oBOMRow As BOMRow + oBOMRow = oBOMView.BOMRows.Item(i) + + Dim strFullFileName As String + strFullFileName = oBOMRow.ReferencedFileDescriptor.FullFileName + + '测试文件 + Debug.Print(strFullFileName) + + ' Set the message for the progress bar + 'oProgressBar.Message = oFullFileName + + If IsFileExsts(strFullFileName) = False Then '跳过不存在的文件 + GoTo 999 + End If + + If InStr(strFullFileName, ContentCenterFiles) > 0 Then '跳过零件库文件 + GoTo 999 + End If + + If oBOMRow.ReferencedFileDescriptor.ReferencedFileType = FileTypeEnum.kPartFileType Then + + 'oInventorPartDocument = ThisApplication.Documents.Open(strFullFileName, False) '打开文件,不显示 + + oInventorPartDocument = ThisApplication.Documents.ItemByName(strFullFileName) + CreateFlatSub(oInventorPartDocument, strBasicIdwFileFullName, strInventorDrawingFolder, IsClose) + End If +999: + Next + End If + Next + MsgBox("钣金件批量生成展开图完成。", MsgBoxStyle.Information) + + Case kPartDocumentObject + oInventorPartDocument = oInventorDocument + CreateFlatSub(oInventorPartDocument, strBasicIdwFileFullName, strInventorDrawingFolder, IsClose) + End Select + + + + 'Catch ex As Exception + ' MsgBox(ex.Message) + 'End Try + + End Sub + + '创建展开图sub + Public Sub CreateFlatSub(ByVal oInventorDocument As Inventor.PartDocument, ByVal strBasicIdwFileFullName As String, _ + ByVal strInventorDrawingFolder As String, ByVal IsClose As Boolean) + On Error Resume Next + + Dim oBaseViewOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap + Dim oTG As TransientGeometry = ThisApplication.TransientGeometry + Dim oPoint As Point2d + + 'Check to see if part is a sheetmetal part + If (oInventorDocument.SubType <> "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}") Then + Exit Sub + End If + + Dim oSMDef As SheetMetalComponentDefinition + oSMDef = oInventorDocument.ComponentDefinition + If oSMDef.HasFlatPattern = False Then + 'create flat pattern + ThisApplication.ScreenUpdating = False + oSMDef.Unfold() + oSMDef.FlatPattern.ExitEdit() + ThisApplication.ScreenUpdating = True + End If + + Dim oFlatPattern As FlatPattern + Dim intFlatExtentsLength As Double '"展开长" 转换单位为mm + Dim intFlatExtentsWidth As Double '展开宽 + oFlatPattern = oSMDef.FlatPattern + intFlatExtentsLength = oFlatPattern.Length * 10 + intFlatExtentsWidth = oFlatPattern.Width * 10 + + + Dim douScale As Double + If intFlatExtentsLength > intFlatExtentsWidth Then + douScale = 150 / intFlatExtentsLength + Else + douScale = 150 / intFlatExtentsWidth + End If + + If douScale > 1 Then + douScale = 1 + End If + + oPoint = oTG.CreatePoint2d(12, 18) + + oBaseViewOptions.Add("SheetMetalFoldedModel", False) + + Dim oInventorDrawingDocument As Inventor.DrawingDocument + + oInventorDrawingDocument = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject, strBasicIdwFileFullName) + Dim oSheet As Sheet = oInventorDrawingDocument.ActiveSheet + Dim oBaseView As DrawingView = oSheet.DrawingViews.AddBaseView(oInventorDocument, oPoint, douScale, + ViewOrientationTypeEnum.kDefaultViewOrientation, + DrawingViewStyleEnum.kHiddenLineRemovedDrawingViewStyle, + , , oBaseViewOptions) + + Dim strInventorDocumentFullFileName As String + strInventorDocumentFullFileName = oInventorDocument.FullFileName + + Dim oFileNameInfo As FileNameInfo + oFileNameInfo = GetFileNameInfo(strInventorDocumentFullFileName) + + If strInventorDrawingFolder = "当前文件夹" Then + strInventorDrawingFolder = oFileNameInfo.Folder + End If + + strInventorDrawingFolder = strInventorDrawingFolder & "\钣金展开\" + If IsDirectoryExists(strInventorDrawingFolder) = False Then + IO.Directory.CreateDirectory(strInventorDrawingFolder) + End If + + Dim strInventorDrawingDocumentFullFileName As String + + strInventorDrawingDocumentFullFileName = strInventorDrawingFolder & oFileNameInfo.OnlyName & "-展开.idw" + + If GetFileReadOnly(strInventorDocumentFullFileName) = False Then + oInventorDocument.Save2() + End If + + + oInventorDrawingDocument.SaveAs(strInventorDrawingDocumentFullFileName, False) + oInventorDrawingDocument.Save2() + + If IsClose = True Then + oInventorDrawingDocument.Close() + End If + ''oInventorDocument.Close() + End Sub + End Module \ No newline at end of file diff --git a/Module/IdwModule.vb b/Module/IdwModule.vb index ba9a6c565ec17411f0a589642bf3647947ebaeed..6ce12796b06eec5232abe4f52ecafd44af1d4362 100644 --- a/Module/IdwModule.vb +++ b/Module/IdwModule.vb @@ -37,7 +37,7 @@ Module IdwModule Dim strInventorDrawingDocumentFullFileName As String strInventorDrawingDocumentFullFileName = oInventorDrawingDocument.FullFileName - If strInventorDrawingDocumentFullFileName = "" Then + If IsFileExsts(strInventorDrawingDocumentFullFileName) = False Then MsgBox("请先保存本工程图。", MsgBoxStyle.Information) Exit Sub End If @@ -147,7 +147,7 @@ Module IdwModule Dim strInventorDrawingDocumentFullFileName As String strInventorDrawingDocumentFullFileName = oInventorDrawingDocument.FullFileName - If strInventorDrawingDocumentFullFileName = "" Then + If IsFileExsts(strInventorDrawingDocumentFullFileName) = False Then MsgBox("请先保存本工程图。", MsgBoxStyle.Information) Exit Sub End If @@ -354,7 +354,9 @@ Module IdwModule For Each oDrawingDim In oSheet.DrawingDimensions If TypeOf oDrawingDim Is LinearGeneralDimension Or TypeOf oDrawingDim Is AngularGeneralDimension Then - Call oDrawingDim.CenterText() + + oDrawingDim.CenterText() + End If Next @@ -396,7 +398,7 @@ Module IdwModule Do oDrawingDim = ThisApplication.CommandManager.Pick(kDrawingDimensionFilter, "选择要文字居中的尺寸,ESC键取消。") If TypeOf oDrawingDim Is LinearGeneralDimension Or TypeOf oDrawingDim Is AngularGeneralDimension Then - Call oDrawingDim.CenterText() + oDrawingDim.CenterText() End If Loop Until (oDrawingDim Is Nothing) @@ -1057,7 +1059,7 @@ Module IdwModule SetStatusBarText("重建序号完成") 'MsgBox("设置工程图自定义属性:比例完成", MsgBoxStyle.Information) - If MsgBox("是否重写BOM序号?", MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.Yes Then + If MsgBox("明细栏是否排序?", MsgBoxStyle.YesNo + MsgBoxStyle.Question) = MsgBoxResult.Yes Then oActiveSheet = oInventorDrawingDocument.ActiveSheet diff --git a/Module/Inventorbasic.vb b/Module/Inventorbasic.vb index 732a3c1bca15fe9d1a83a3f2fea328075bb6d743..71bd9620e9fd150c34c467a07c4790555516deb8 100644 --- a/Module/Inventorbasic.vb +++ b/Module/Inventorbasic.vb @@ -99,6 +99,9 @@ Module InventorBasic '标题栏模板 Public TitleBlockIdwDoc As String + '批量打印设置 + Public PrintSetting As String + '声明并初始化变量 Public _ListViewSorter As clsListViewSorter.EnumSortOrder = clsListViewSorter.EnumSortOrder.Ascending @@ -138,9 +141,6 @@ Module InventorBasic 'End If End If - - - End Sub @@ -497,9 +497,10 @@ Module InventorBasic Return False End Select - Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents - oInteraction.Start() - oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) + 'Dim oInteraction As InteractionEvents = ThisApplication.CommandManager.CreateInteractionEvents + + 'oInteraction.Start() + 'oInteraction.SetCursor(CursorTypeEnum.kCursorTypeWindows, 32514) 'System.Threading.Thread.Sleep(5000) 'oInteraction.Stop() @@ -523,7 +524,7 @@ Module InventorBasic End If Next '============================================================================================== - oInteraction.Stop() + 'oInteraction.Stop() Return True End Function diff --git a/Module/IptModule.vb b/Module/IptModule.vb index fbfc041bfd836603e0d04593877311dc2e0f9d4b..fec925a52d9ecadba19f4372059552891b15279d 100644 --- a/Module/IptModule.vb +++ b/Module/IptModule.vb @@ -34,7 +34,7 @@ Module IptModule End If Dim oInventorDocument As Inventor.Document - oInventorDocument = ThisApplication.ActiveDocument + oInventorDocument = ThisApplication.ActiveEditDocument If oInventorDocument.SelectSet.Count <> 0 Then 'For Each oSelect As Object In InventorDoc.SelectSet @@ -68,7 +68,7 @@ Module IptModule End If Dim oInventorDocument As Inventor.Document - oInventorDocument = ThisApplication.ActiveDocument + oInventorDocument = ThisApplication.ActiveEditDocument Dim strInventorDocument As String strInventorDocument = oInventorDocument.FullFileName diff --git a/Module/OpenFrom.vb b/Module/OpenFrom.vb index 6893ae50f9f9f2602fb84b46072ca3c4b0a5b8a8..71749f4b080b44fb074f4f230a7ed4bf5315a781 100644 --- a/Module/OpenFrom.vb +++ b/Module/OpenFrom.vb @@ -62,7 +62,7 @@ Module OpenFrom End If Dim AutoPartNumber As New frmAutoPartNumber - AutoPartNumber.Show() + AutoPartNumber.ShowDialog() Catch ex As Exception MsgBox(ex.Message) End Try @@ -74,14 +74,14 @@ Module OpenFrom Try SetStatusBarText() - If IsInventorOpenDocument() = False Then - Exit Sub - End If + 'If IsInventorOpenDocument() = False Then + ' Exit Sub + 'End If - If ThisApplication.ActiveDocumentType <> kDrawingDocumentObject Then - MsgBox("该功能仅适用于工程图。", MsgBoxStyle.Information) - Exit Sub - End If + 'If ThisApplication.ActiveDocumentType <> kDrawingDocumentObject Then + ' MsgBox("该功能仅适用于工程图。", MsgBoxStyle.Information) + ' Exit Sub + 'End If Dim frmSpecification As New frmSpecification frmSpecification.ShowDialog() @@ -96,7 +96,7 @@ Module OpenFrom Try SetStatusBarText() Dim frmPrint As New frmPrint - frmPrint.Show() + frmPrint.ShowDialog() Catch ex As Exception MsgBox(ex.Message) End Try @@ -108,7 +108,7 @@ Module OpenFrom Try SetStatusBarText() Dim frmSearchERPCode As New frmSearchERPCode - frmSearchERPCode.Show() + frmSearchERPCode.ShowDialog() Catch ex As Exception MsgBox(ex.Message) End Try @@ -120,7 +120,7 @@ Module OpenFrom Try SetStatusBarText() Dim frmERPCodeSearch As New frmERPCodeSearch - frmERPCodeSearch.Show() + frmERPCodeSearch.ShowDialog() Catch ex As Exception MsgBox(ex.Message) End Try @@ -141,8 +141,8 @@ Module OpenFrom Exit Sub End If - Dim frmInventoryCoding As New frmImportCodeToIam - frmInventoryCoding.Show() + Dim frmImportCodeToIam As New frmImportCodeToIam + frmImportCodeToIam.ShowDialog() Catch ex As Exception MsgBox(ex.Message) End Try @@ -154,12 +154,12 @@ Module OpenFrom Try SetStatusBarText() - If IsInventorOpenDocument() = False Then - Exit Sub - End If + 'If IsInventorOpenDocument() = False Then + ' Exit Sub + 'End If Dim frmImportCodeToBomExcel As New frmImportCodeToBomExcel - frmImportCodeToBomExcel.Show() + frmImportCodeToBomExcel.ShowDialog() Catch ex As Exception MsgBox(ex.Message) End Try @@ -242,7 +242,7 @@ Module OpenFrom End If Dim frmGetPart As New frmGetPart - frmGetPart.Show() + frmGetPart.ShowDialog() Catch ex As Exception MsgBox(ex.Message) End Try @@ -265,7 +265,31 @@ Module OpenFrom End If Dim frmSetWriteOnly As New frmSetWriteOnly - frmSetWriteOnly.Show() + frmSetWriteOnly.ShowDialog() + Catch ex As Exception + MsgBox(ex.Message) + End Try + + End Sub + + + '打开编辑尺寸窗口 + Public Sub FrmEditDimensionShow() + Try + SetStatusBarText() + + If IsInventorOpenDocument() = False Then + Exit Sub + End If + + If ThisApplication.ActiveEditDocument.DocumentType <> kPartDocumentObject Then + MsgBox("该功能仅适用于零件。", MsgBoxStyle.Information) + Exit Sub + End If + + Dim frmEditDimension As New frmEditDimension + frmEditDimension.ShowDialog() + Catch ex As Exception MsgBox(ex.Message) End Try diff --git a/Module/WRXml.vb b/Module/WRXml.vb index e7c304c8c630938a0a163ae61234e4a420be9370..3000ca5dd3e63d6bf7e83be0fa6a79b532ae64e2 100644 --- a/Module/WRXml.vb +++ b/Module/WRXml.vb @@ -63,6 +63,9 @@ Module WrXml XWriter.WriteElementString("NewVersionTxt", NewVersionTxt) XWriter.WriteElementString("TitleBlockIdwDoc", TitleBlockIdwDoc) + + XWriter.WriteElementString("PrintSetting", PrintSetting) + XWriter.WriteEndElement() XWriter.Close() @@ -133,6 +136,8 @@ Module WrXml Case "TitleBlockIdwDoc" : TitleBlockIdwDoc = XReader.Value + Case "PrintSetting" : PrintSetting = XReader.Value + End Select End Select End While @@ -176,6 +181,8 @@ Module WrXml TitleBlockIdwDoc = My.Application.Info.DirectoryPath & "\模板.idw" + PrintSetting = "1101111001" + End Sub End Module \ No newline at end of file diff --git a/My Project/Resources.Designer.vb b/My Project/Resources.Designer.vb index b92f6bca4ac9a730c954bfc5b6887a69bc8d65e2..d865fba687e9805f87995d6684360ca0c9795d37 100644 --- a/My Project/Resources.Designer.vb +++ b/My Project/Resources.Designer.vb @@ -250,6 +250,16 @@ Namespace My.Resources End Get End Property + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 创建展开161624() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("创建展开161624", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + ''' ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 ''' @@ -810,6 +820,46 @@ Namespace My.Resources End Get End Property + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 替换为库文件161624() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("替换为库文件161624", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 替换为库文件1616241() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("替换为库文件1616241", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 替换为库文件323224() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("替换为库文件323224", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 替换为库文件3232241() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("替换为库文件3232241", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + ''' ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 ''' @@ -890,6 +940,66 @@ Namespace My.Resources End Get End Property + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 标准件可见性161624() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("标准件可见性161624", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 标准件可见性1616241() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("标准件可见性1616241", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 标准件可见性1616242() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("标准件可见性1616242", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 标准件可见性323224() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("标准件可见性323224", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 标准件可见性3232241() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("标准件可见性3232241", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 标准件可见性3232242() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("标准件可见性3232242", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + ''' ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 ''' @@ -1050,6 +1160,26 @@ Namespace My.Resources End Get End Property + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 确定161632() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("确定161632", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 确定1616322() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("确定1616322", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + ''' ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 ''' @@ -1100,6 +1230,46 @@ Namespace My.Resources End Get End Property + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 编辑尺寸161632() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("编辑尺寸161632", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 编辑尺寸1616321() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("编辑尺寸1616321", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 编辑尺寸323232() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("编辑尺寸323232", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 编辑尺寸3232321() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("编辑尺寸3232321", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + ''' ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 ''' @@ -1360,6 +1530,26 @@ Namespace My.Resources End Get End Property + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 还原161632() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("还原161632", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 还原1616322() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("还原1616322", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + ''' ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 ''' @@ -1380,6 +1570,26 @@ Namespace My.Resources End Get End Property + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 选择161632() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("选择161632", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + + ''' + ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 + ''' + Public ReadOnly Property 选择1616322() As System.Drawing.Icon + Get + Dim obj As Object = ResourceManager.GetObject("选择1616322", resourceCulture) + Return CType(obj,System.Drawing.Icon) + End Get + End Property + ''' ''' 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。 ''' diff --git a/My Project/Resources.resx b/My Project/Resources.resx index f8ffd4d56952a18b3a5553af8bf8ae8ef8ae6649..2bab8c9c67fbe8832b5fd636af57f21a6b484a5a 100644 --- a/My Project/Resources.resx +++ b/My Project/Resources.resx @@ -550,4 +550,67 @@ ..\Resources\设置属性323224.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\标准件可见性161624.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\标准件可见性323224.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\替换为库文件161624.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\替换为库文件323224.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\标准件可见性161624.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\标准件可见性323224.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\确定161632.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\编辑尺寸161632.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\编辑尺寸323232.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\还原161632.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\选择161632.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\替换为库文件161624.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\替换为库文件323224.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\标准件可见性161624.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\标准件可见性323224.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\确定161632.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\编辑尺寸161632.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\编辑尺寸323232.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\还原161632.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\选择161632.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\创建展开161624.ICO;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Release/InventorAddIn.dll b/Release/InventorAddIn.dll index 895533295f64ab1ea907b2384ce0b7a67f3942e1..9255628a2dc68427788dded1f92d03de7cc3aad0 100644 Binary files a/Release/InventorAddIn.dll and b/Release/InventorAddIn.dll differ diff --git a/Release/NewVison.txt b/Release/NewVison.txt index 3635ed05a5d8a1b0c301393bcbbc73cfad553cac..a46b99b8c172fe92914c4c6dbbf70df4b818eeb7 100644 --- a/Release/NewVison.txt +++ b/Release/NewVison.txt @@ -1 +1 @@ -1230628 \ No newline at end of file +1231027 \ No newline at end of file diff --git "a/Release/\346\233\264\346\226\260\346\224\257\346\214\2012015\344\273\245\344\270\212\347\211\210\346\234\254" "b/Release/\346\233\264\346\226\260\346\224\257\346\214\2012016\344\273\245\344\270\212\347\211\210\346\234\254" similarity index 100% rename from "Release/\346\233\264\346\226\260\346\224\257\346\214\2012015\344\273\245\344\270\212\347\211\210\346\234\254" rename to "Release/\346\233\264\346\226\260\346\224\257\346\214\2012016\344\273\245\344\270\212\347\211\210\346\234\254" diff --git "a/Resources/\345\210\233\345\273\272\345\261\225\345\274\200161624.ICO" "b/Resources/\345\210\233\345\273\272\345\261\225\345\274\200161624.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..50dcf7a63049bfd031823a3dcf2741216ac90f6a Binary files /dev/null and "b/Resources/\345\210\233\345\273\272\345\261\225\345\274\200161624.ICO" differ diff --git "a/Resources/\346\233\277\346\215\242\344\270\272\345\272\223\346\226\207\344\273\266161624.ICO" "b/Resources/\346\233\277\346\215\242\344\270\272\345\272\223\346\226\207\344\273\266161624.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..bbaffcf9cfe0c9c21f7117717015fe8549189cd2 Binary files /dev/null and "b/Resources/\346\233\277\346\215\242\344\270\272\345\272\223\346\226\207\344\273\266161624.ICO" differ diff --git "a/Resources/\346\233\277\346\215\242\344\270\272\345\272\223\346\226\207\344\273\266323224.ICO" "b/Resources/\346\233\277\346\215\242\344\270\272\345\272\223\346\226\207\344\273\266323224.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..8cef88d57d32293b9fb8ede35228e60df7008245 Binary files /dev/null and "b/Resources/\346\233\277\346\215\242\344\270\272\345\272\223\346\226\207\344\273\266323224.ICO" differ diff --git "a/Resources/\346\240\207\345\207\206\344\273\266\345\217\257\350\247\201\346\200\247161624.ico" "b/Resources/\346\240\207\345\207\206\344\273\266\345\217\257\350\247\201\346\200\247161624.ico" new file mode 100644 index 0000000000000000000000000000000000000000..202c0514ebfb35ce8649df4063a74a1bc7bedb76 Binary files /dev/null and "b/Resources/\346\240\207\345\207\206\344\273\266\345\217\257\350\247\201\346\200\247161624.ico" differ diff --git "a/Resources/\346\240\207\345\207\206\344\273\266\345\217\257\350\247\201\346\200\247323224.ico" "b/Resources/\346\240\207\345\207\206\344\273\266\345\217\257\350\247\201\346\200\247323224.ico" new file mode 100644 index 0000000000000000000000000000000000000000..493375b8f45206895a20c7b63c4a4f628520f729 Binary files /dev/null and "b/Resources/\346\240\207\345\207\206\344\273\266\345\217\257\350\247\201\346\200\247323224.ico" differ diff --git "a/Resources/\347\241\256\345\256\232161632.ICO" "b/Resources/\347\241\256\345\256\232161632.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..a85c08c42c0c12b165364d73c46ac5e4852809dd Binary files /dev/null and "b/Resources/\347\241\256\345\256\232161632.ICO" differ diff --git "a/Resources/\347\241\256\345\256\2321616321.ICO" "b/Resources/\347\241\256\345\256\2321616321.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..a85c08c42c0c12b165364d73c46ac5e4852809dd Binary files /dev/null and "b/Resources/\347\241\256\345\256\2321616321.ICO" differ diff --git "a/Resources/\347\274\226\350\276\221\345\260\272\345\257\270161632.ICO" "b/Resources/\347\274\226\350\276\221\345\260\272\345\257\270161632.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..bf40ad71157cf16613634c42d1f6d28dfcfef48c Binary files /dev/null and "b/Resources/\347\274\226\350\276\221\345\260\272\345\257\270161632.ICO" differ diff --git "a/Resources/\347\274\226\350\276\221\345\260\272\345\257\270323232.ICO" "b/Resources/\347\274\226\350\276\221\345\260\272\345\257\270323232.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..d95891d872626314345a28b5f4bf2c0f61fda5d9 Binary files /dev/null and "b/Resources/\347\274\226\350\276\221\345\260\272\345\257\270323232.ICO" differ diff --git "a/Resources/\350\277\230\345\216\237161632.ICO" "b/Resources/\350\277\230\345\216\237161632.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..bdc8fc41fa9e807736effa00d002d28fc2269122 Binary files /dev/null and "b/Resources/\350\277\230\345\216\237161632.ICO" differ diff --git "a/Resources/\350\277\230\345\216\2371616321.ICO" "b/Resources/\350\277\230\345\216\2371616321.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..bdc8fc41fa9e807736effa00d002d28fc2269122 Binary files /dev/null and "b/Resources/\350\277\230\345\216\2371616321.ICO" differ diff --git "a/Resources/\351\200\211\346\213\251161632.ICO" "b/Resources/\351\200\211\346\213\251161632.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..9bf94cc5ce27731d4fb344d0c64cab779b412a3d Binary files /dev/null and "b/Resources/\351\200\211\346\213\251161632.ICO" differ diff --git "a/Resources/\351\200\211\346\213\2511616321.ICO" "b/Resources/\351\200\211\346\213\2511616321.ICO" new file mode 100644 index 0000000000000000000000000000000000000000..9bf94cc5ce27731d4fb344d0c64cab779b412a3d Binary files /dev/null and "b/Resources/\351\200\211\346\213\2511616321.ICO" differ diff --git a/StandardAddInServer.vb b/StandardAddInServer.vb index a03c1a91b4f6878143babf024692d2d326bdee80..cbd7f94958ac299697fada656da16a75c684905e 100644 Binary files a/StandardAddInServer.vb and b/StandardAddInServer.vb differ diff --git a/update/2015/0ff2e9ecd16f4fdd861c18ab0876be2d.zip b/update/2015/0ff2e9ecd16f4fdd861c18ab0876be2d.zip deleted file mode 100644 index 2e2a9a3885ba55867be8f76fe16c164eae0ff19c..0000000000000000000000000000000000000000 Binary files a/update/2015/0ff2e9ecd16f4fdd861c18ab0876be2d.zip and /dev/null differ diff --git a/update/2015/4d83f42a547e422aade2dedf67617624.zip b/update/2015/4d83f42a547e422aade2dedf67617624.zip deleted file mode 100644 index 07e9a01df9e4405e5aef243f1a44b12df82b9820..0000000000000000000000000000000000000000 Binary files a/update/2015/4d83f42a547e422aade2dedf67617624.zip and /dev/null differ diff --git a/update/2015/69d6accfc88644cfb7342355245694d5.zip b/update/2015/69d6accfc88644cfb7342355245694d5.zip deleted file mode 100644 index 9e316e35c5d2b4d8edc4f3a4e2b736f1a2b9e21a..0000000000000000000000000000000000000000 Binary files a/update/2015/69d6accfc88644cfb7342355245694d5.zip and /dev/null differ diff --git a/update/2015/81d256c289f04ec9ac2f6381e9c4a8ce.zip b/update/2015/81d256c289f04ec9ac2f6381e9c4a8ce.zip deleted file mode 100644 index 1553d94a9ae10a9ad7c60b988a66e1e3ff737c92..0000000000000000000000000000000000000000 Binary files a/update/2015/81d256c289f04ec9ac2f6381e9c4a8ce.zip and /dev/null differ diff --git a/update/2015/b0ade73accca40a0a478df7fe6df4639.zip b/update/2015/b0ade73accca40a0a478df7fe6df4639.zip deleted file mode 100644 index d34b938e53d59cf7ebde8db82c121dbcd6f4d5e2..0000000000000000000000000000000000000000 Binary files a/update/2015/b0ade73accca40a0a478df7fe6df4639.zip and /dev/null differ diff --git a/update/2015/e080d2087ab84494a0f833b127f289be.zip b/update/2015/e080d2087ab84494a0f833b127f289be.zip deleted file mode 100644 index 83f5af6fb114f9d7ce5fbc16cf6ab57bec685d39..0000000000000000000000000000000000000000 Binary files a/update/2015/e080d2087ab84494a0f833b127f289be.zip and /dev/null differ diff --git a/update/2015/update.xml b/update/2015/update.xml deleted file mode 100644 index b35fc978ed2d38eb997ea7468840ea27ab232fba..0000000000000000000000000000000000000000 --- a/update/2015/update.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - InventorAddIn - 1.23.3.6 - - - startinventor.bat - 0 - false - true - true - - 81d256c289f04ec9ac2f6381e9c4a8ce.zip - AD59866F112D998B6513C1BEB810386E - None - 843450 - true - - - InAISetting.xml - 1011 - 0.0.0.0 - D8D487A35DD246E3333FD29CF4C6C344 - 0ff2e9ecd16f4fdd861c18ab0876be2d.zip - 633 - SkipIfExists - None - 64FDB765B25D1D0305C1F895749C70E9 - - InAISetting.xml - - - - InventorAddIn.dll - 1615360 - 1.23.3.6 - AE97BD8EB3094F87E51DCF7F570163ED - e080d2087ab84494a0f833b127f289be.zip - 331890 - VersionCompare - Hash - 2A45BD2314A348DDA0628EADA8CE5337 - - InventorAddIn.dll - - - - SimpleUpdater.exe - 460800 - 4.3.0.0 - 36EF028544D4FFE8BC238B5F63360555 - b0ade73accca40a0a478df7fe6df4639.zip - 165130 - SkipIfExists - None - 1D26E9AEA002A60DC91DC9925AC72EFE - - SimpleUpdater.exe - - - - startinventor.bat - 447 - 0.0.0.0 - F33A243A93DAA65DADD8F703754745BF - 69d6accfc88644cfb7342355245694d5.zip - 283 - VersionCompare - Hash - 7B8CF2926393D10E6AA32CA9C5B01686 - - startinventor.bat - - - - 模板.idw - 345600 - 0.0.0.0 - 58559D8D6D3C97E1F7DA40ED1D15B2DE - 4d83f42a547e422aade2dedf67617624.zip - 345602 - SkipIfExists - Hash - B78511FC3DEAE6B076F05AD72D510429 - - 模板.idw - - - - false - true - \\likai-pc\发行版\更新包\CHANGELOG.html - false - true - true - true - true - \ No newline at end of file diff --git a/update/2015/update_c.xml b/update/2015/update_c.xml deleted file mode 100644 index 1cb1cede75d9cc189b4560cc5acfefd22e85b642..0000000000000000000000000000000000000000 Binary files a/update/2015/update_c.xml and /dev/null differ diff --git a/update/NewVersion.txt b/update/NewVersion.txt deleted file mode 100644 index 022ebf4d0275cab75f865d366ada263d6044eff4..0000000000000000000000000000000000000000 --- a/update/NewVersion.txt +++ /dev/null @@ -1 +0,0 @@ -230306 \ No newline at end of file diff --git a/update/SimpleUpdater.exe b/update/SimpleUpdater.exe deleted file mode 100644 index 2d4a1e5937e2cd32bc289946de0a6e2845124550..0000000000000000000000000000000000000000 Binary files a/update/SimpleUpdater.exe and /dev/null differ