提交 4c602016 编写于 作者: leaky114's avatar leaky114

21.12.3

上级 7560c3b4
......@@ -2,7 +2,7 @@ Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' General Information about an assembly is controlled through the following
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
......@@ -21,11 +21,11 @@ Imports System.Runtime.InteropServices
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
<Assembly: AssemblyVersion("1.21.11.28")>
......

Imports Inventor
Imports Inventor
'//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
'// Use: Implements a simple user interaction. User picks up an entity and its type will be displayed.
......@@ -13,7 +12,6 @@ Public Class clsDrawSlot
Private mMouseEvents As MouseEvents
Private mMousePosition As MouseEvents
Public Sub New(ByVal oApplication As Inventor.Application)
mApplication = oApplication
......@@ -39,7 +37,6 @@ Public Class clsDrawSlot
mMouseEvents.MouseMoveEnabled = True
mMouseEvents.PointInferenceEnabled = True
'Remember to Start/Stop the interaction event
mInteractionEvents.Start()
......@@ -56,7 +53,6 @@ Public Class clsDrawSlot
End Sub
'OnMouseClick(Button As MouseButtonEnum, ShiftKeys As ShiftStateEnum, ModelPosition As Point, ViewPosition As Point2d, view As View)
Public Sub mMousePostion_Click(ByVal Button As MouseButtonEnum, ByVal ShiftKeys As ShiftStateEnum, ByVal ModelPosition As Point, _
ByVal ViewPosition As Point2d, ByVal view As View)
......@@ -83,10 +79,8 @@ Public Class clsDrawSlot
createSlotTransaction.End()
mInteractionEvents.Stop()
End Sub
Private Sub mSelectEvents_OnSelect(ByVal JustSelectedEntities As Inventor.ObjectsEnumerator, ByVal SelectionDevice As Inventor.SelectionDeviceEnum, ByVal ModelPosition As Inventor.Point, ByVal ViewPosition As Inventor.Point2d, ByVal View As Inventor.View)
......

Imports FSLib.App.SimpleUpdater
Imports FSLib.App.SimpleUpdater
Public NotInheritable Class About
Const GitWeb As String = "https://codechina.csdn.net/leaky114/inventoraddin"
Private Sub AboutBox1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' 设置此窗体的标题。
Dim ApplicationTitle As String
......@@ -16,7 +14,7 @@ Public NotInheritable Class About
End If
Me.Text = String.Format("关于 {0}", ApplicationTitle)
' 初始化“关于”对话框显示的所有文字。
' TODO: 在项目的“应用程序”窗格中自定义此应用程序的程序集信息
' TODO: 在项目的“应用程序”窗格中自定义此应用程序的程序集信息
' 属性对话框(在“项目”菜单下)。
Me.LabelProductName.Text = String.Format("产品 {0}", My.Application.Info.ProductName)
Me.LabelVersion.Text = String.Format("版本 {0}", My.Application.Info.Version.ToString)
......@@ -41,10 +39,10 @@ Public NotInheritable Class About
' MsgBox(ex.Message)
'End Try
NewUpdater.UpDater2(True)
NewUpdater.UpDater2(True)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Process.Start(GitWeb)
End Sub
End Class
End Class
\ No newline at end of file
......@@ -41,7 +41,6 @@ Public Class AllSaveAsDialog
' GoTo 999
'End If
If RadioButton1.Checked = True Then
DwgFullFileName = Strings.Replace(IdwFullFileName, LCaseGetFileExtension(IdwFullFileName), ".dwg")
PdfFullFileName = Strings.Replace(IdwFullFileName, LCaseGetFileExtension(IdwFullFileName), ".pdf")
......@@ -122,7 +121,6 @@ Public Class AllSaveAsDialog
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
Dim NeFolderBrowserDialog As New FolderBrowserDialog
If RadioButton2.Checked = True Then
RadioButton1.Checked = False
Button3.Enabled = True
......@@ -190,4 +188,4 @@ Public Class AllSaveAsDialog
End Sub
End Class
End Class
\ No newline at end of file
......@@ -55,7 +55,6 @@ Public Class AutoPartNumberDialog
End If
Next
Dim OldIdwFullFileName As String
OldIdwFullFileName = GetNewExtensionFileName(OldFullFileName, ".idw") '旧工程图
If IsFileExsts(OldIdwFullFileName) = True Then
......@@ -93,7 +92,6 @@ Public Class AutoPartNumberDialog
Me.Close()
End Sub
'上移
Private Sub ListViewUp(ByVal ListView As ListView)
Dim index As Integer
......@@ -195,7 +193,6 @@ Public Class AutoPartNumberDialog
' ListView1.DoDragDrop(ListView1.SelectedItems, DragDropEffects.Move)
'End Sub
'键盘上下键移动
Private Sub ListView1_KeyDown1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ListView1.KeyDown
Select Case e.KeyCode
......@@ -226,7 +223,6 @@ Public Class AutoPartNumberDialog
PartNum = 1
BasicStockNumn = TextBox1.Text
For i = 0 To ListView1.Items.Count - 1
LVI = ListView1.Items(i)
If LVI.SubItems(1).Text = ".ipt" Then
......@@ -260,7 +256,6 @@ Public Class AutoPartNumberDialog
Dim AssFullFileName As String
AssFullFileName = assdoc.FullFileName
Dim StockNumPartName As StockNumPartName
......@@ -327,7 +322,6 @@ Public Class AutoPartNumberDialog
LoadAssBOM(AsmDoc, ListView1)
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
If ListView1.SelectedIndices.Count > 0 Then
Dim index As Integer = ListView1.SelectedIndices(0)
......@@ -352,11 +346,11 @@ Public Class AutoPartNumberDialog
AsmDoc = ThisApplication.ActiveDocument
AssFullFileName = AsmDoc.FullFileName
' 获取装配定义
' 获取装配定义
Dim oAsmDef As AssemblyComponentDefinition
oAsmDef = AsmDoc.ComponentDefinition
' 获取装配子集
' 获取装配子集
Dim oOccs As ComponentOccurrences
oOccs = oAsmDef.Occurrences
......@@ -390,7 +384,7 @@ Public Class AutoPartNumberDialog
Dim ptScreen As Drawing.Point = New Drawing.Point(e.X, e.Y)
Dim pt As Drawing.Point = ListView1.PointToClient(ptScreen)
Dim TargetItem As ListViewItem
TargetItem = ListView1.GetItemAt(pt.X, pt.Y) '拖动的项将放置于该项之前
TargetItem = ListView1.GetItemAt(pt.X, pt.Y) '拖动的项将放置于该项之前
If (TargetItem Is Nothing) Then
Exit Sub
End If
......@@ -414,7 +408,6 @@ Public Class AutoPartNumberDialog
ListView1.InsertionMark.Index = index
End Sub
Private Sub ListView1_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles ListView1.ItemDrag
ListView1.InsertionMark.Color = System.Drawing.Color.ForestGreen
ListView1.DoDragDrop(e.Item, DragDropEffects.Move)
......@@ -424,4 +417,4 @@ Public Class AutoPartNumberDialog
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
End Sub
End Class
End Class
\ No newline at end of file
......@@ -60,5 +60,4 @@ Public Class ChangeIproDialog
TextBox3.Text = Str_TempText
End Sub
End Class
End Class
\ No newline at end of file
......@@ -4,7 +4,6 @@ Imports Inventor.SelectTypeEnum
Imports Inventor.DocumentTypeEnum
Imports Inventor
Public Class GetPartDialog
'添加
......@@ -33,12 +32,11 @@ Public Class GetPartDialog
End If
For Each oSelect As Object In InventorDoc.SelectSet
'Dim
'Dim
'If (oSelect.GetType Is ) = True Then
'Dim FullFileName As String
'Dim FNI As FileNameInfo
'FullFileName = oSelect.name
'FNI = GetFileNameInfo(FullFileName)
......@@ -64,7 +62,6 @@ Public Class GetPartDialog
Val_Mass_Accuracy = Val(Mass_Accuracy)
valMass = Math.Round(valMass, Val_Mass_Accuracy)
Dim valArea As Double
valArea = oSelect.MassProperties.area / 10000
valArea = valArea + 0.00000001
......@@ -143,4 +140,4 @@ Public Class GetPartDialog
Private Sub GetPartDialog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
End Class
\ No newline at end of file
......@@ -36,4 +36,4 @@ Public Class HanFengJiSuan
Me.Close()
End Sub
End Class
End Class
\ No newline at end of file
......@@ -15,4 +15,4 @@ Public Class InputBoxDialog
Private Sub InputBoxDialog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TextBox1.Focus()
End Sub
End Class
End Class
\ No newline at end of file
......@@ -23,11 +23,11 @@ Public Class InventoryCoding
Exit Sub
End If
' 获取所有引用文档
' 获取所有引用文档
Dim oRefDocs As DocumentsEnumerator
oRefDocs = AsmDoc.AllReferencedDocuments
' 遍历这些文档
' 遍历这些文档
Dim oRefDoc As Document
For Each oRefDoc In oRefDocs
Debug.Print(oRefDoc.DisplayName)
......@@ -61,7 +61,6 @@ Public Class InventoryCoding
Private Sub 导入Excel文件ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 导入Excel文件ToolStripMenuItem.Click
Dim ExcelFullFileName As String = Nothing
'打开文件
......@@ -121,7 +120,6 @@ Public Class InventoryCoding
Dim i As Integer = 0
Dim j As Integer
LV.Items.Clear()
For Each exsheet In exbook.Sheets
......@@ -139,8 +137,6 @@ Public Class InventoryCoding
oBOMRowData(k, j) = exrangevalue
Next
i = i + 1
k = k + 1
Loop
......@@ -157,8 +153,6 @@ Public Class InventoryCoding
LVI.SubItems.Add(oBOMRowData(i, 2))
Next
'删除空项
'For Each LVI In LV.Items
' If LVI.Text = "" Then
......
......@@ -22,59 +22,59 @@ Partial Class OptionDialog
'不要使用代码编辑器修改它。
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel
Me.OK_Button = New System.Windows.Forms.Button
Me.Cancel_Button = New System.Windows.Forms.Button
Me.cbo图号 = New System.Windows.Forms.ComboBox
Me.cbo文件名 = New System.Windows.Forms.ComboBox
Me.Label1 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.cbo存货编码 = New System.Windows.Forms.ComboBox
Me.Label12 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.GroupBox2 = New System.Windows.Forms.GroupBox
Me.txt文件名映射 = New System.Windows.Forms.TextBox
Me.txt图号映射 = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.GroupBox4 = New System.Windows.Forms.GroupBox
Me.chk签字 = New System.Windows.Forms.CheckBox
Me.txt工程师 = New System.Windows.Forms.TextBox
Me.Label7 = New System.Windows.Forms.Label
Me.chk签字后打印 = New System.Windows.Forms.CheckBox
Me.txt打印日期 = New System.Windows.Forms.TextBox
Me.Label6 = New System.Windows.Forms.Label
Me.GroupBox5 = New System.Windows.Forms.GroupBox
Me.btn清除 = New System.Windows.Forms.Button
Me.btn还原 = New System.Windows.Forms.Button
Me.btn添加 = New System.Windows.Forms.Button
Me.cbo添加 = New System.Windows.Forms.ComboBox
Me.txtBOM导出项 = New System.Windows.Forms.TextBox
Me.Label8 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.cbo质量精度 = New System.Windows.Forms.ComboBox
Me.Label5 = New System.Windows.Forms.Label
Me.txt比例 = New System.Windows.Forms.TextBox
Me.GroupBox3 = New System.Windows.Forms.GroupBox
Me.CheckBox3 = New System.Windows.Forms.CheckBox
Me.GroupBox6 = New System.Windows.Forms.GroupBox
Me.cbo面积精度 = New System.Windows.Forms.ComboBox
Me.Label10 = New System.Windows.Forms.Label
Me.GroupBox7 = New System.Windows.Forms.GroupBox
Me.CheckBox4 = New System.Windows.Forms.CheckBox
Me.txt图号 = New System.Windows.Forms.TextBox
Me.Label11 = New System.Windows.Forms.Label
Me.chk检查更新 = New System.Windows.Forms.CheckBox
Me.GroupBox8 = New System.Windows.Forms.GroupBox
Me.txt查询列 = New System.Windows.Forms.TextBox
Me.Label16 = New System.Windows.Forms.Label
Me.txt查找范围 = New System.Windows.Forms.TextBox
Me.Label15 = New System.Windows.Forms.Label
Me.txt数据表 = New System.Windows.Forms.TextBox
Me.Label14 = New System.Windows.Forms.Label
Me.btnexcel文件 = New System.Windows.Forms.Button
Me.txtexcel文件 = New System.Windows.Forms.TextBox
Me.Label13 = New System.Windows.Forms.Label
Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Me.OK_Button = New System.Windows.Forms.Button()
Me.Cancel_Button = New System.Windows.Forms.Button()
Me.cbo图号 = New System.Windows.Forms.ComboBox()
Me.cbo文件名 = New System.Windows.Forms.ComboBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.cbo存货编码 = New System.Windows.Forms.ComboBox()
Me.Label12 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.txt文件名映射 = New System.Windows.Forms.TextBox()
Me.txt图号映射 = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
Me.chk签字 = New System.Windows.Forms.CheckBox()
Me.txt工程师 = New System.Windows.Forms.TextBox()
Me.Label7 = New System.Windows.Forms.Label()
Me.chk签字后打印 = New System.Windows.Forms.CheckBox()
Me.txt打印日期 = New System.Windows.Forms.TextBox()
Me.Label6 = New System.Windows.Forms.Label()
Me.GroupBox5 = New System.Windows.Forms.GroupBox()
Me.btn清除 = New System.Windows.Forms.Button()
Me.btn还原 = New System.Windows.Forms.Button()
Me.btn添加 = New System.Windows.Forms.Button()
Me.cbo添加 = New System.Windows.Forms.ComboBox()
Me.txtBOM导出项 = New System.Windows.Forms.TextBox()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label9 = New System.Windows.Forms.Label()
Me.cbo质量精度 = New System.Windows.Forms.ComboBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.txt比例 = New System.Windows.Forms.TextBox()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.CheckBox3 = New System.Windows.Forms.CheckBox()
Me.GroupBox6 = New System.Windows.Forms.GroupBox()
Me.cbo面积精度 = New System.Windows.Forms.ComboBox()
Me.Label10 = New System.Windows.Forms.Label()
Me.GroupBox7 = New System.Windows.Forms.GroupBox()
Me.CheckBox4 = New System.Windows.Forms.CheckBox()
Me.txt图号 = New System.Windows.Forms.TextBox()
Me.Label11 = New System.Windows.Forms.Label()
Me.chk检查更新 = New System.Windows.Forms.CheckBox()
Me.GroupBox8 = New System.Windows.Forms.GroupBox()
Me.txt查询列 = New System.Windows.Forms.TextBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.txt查找范围 = New System.Windows.Forms.TextBox()
Me.Label15 = New System.Windows.Forms.Label()
Me.txt数据表 = New System.Windows.Forms.TextBox()
Me.Label14 = New System.Windows.Forms.Label()
Me.btnexcel文件 = New System.Windows.Forms.Button()
Me.txtexcel文件 = New System.Windows.Forms.TextBox()
Me.Label13 = New System.Windows.Forms.Label()
Me.TableLayoutPanel1.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
......@@ -541,7 +541,7 @@ Partial Class OptionDialog
Me.txt查询列.Name = "txt查询列"
Me.txt查询列.Size = New System.Drawing.Size(89, 21)
Me.txt查询列.TabIndex = 15
Me.txt查询列.Text = "2,4"
Me.txt查询列.Text = "2"
'
'Label16
'
......
......@@ -24,7 +24,6 @@ Public Class OptionDialog
Table_Array = txt查找范围.Text
Col_Index_Num = txt查询列.Text
'打印签字
Select Case chk签字后打印.Checked
Case False
......@@ -58,7 +57,6 @@ Public Class OptionDialog
IsSetMass = "1"
End Select
'启动检查更新
Select Case chk检查更新.Checked
Case False
......@@ -97,8 +95,6 @@ Public Class OptionDialog
Area_Accuracy = "6"
End Select
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\InventorTool", "MapStochNum", Map_StochNum)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\InventorTool", "MapPartName", Map_PartName)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\InventorTool", "MapPartNum", Map_PartNum)
......@@ -129,7 +125,6 @@ Public Class OptionDialog
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\InventorTool", "Table_Array", Table_Array)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\InventorTool", "Col_Index_Num", Col_Index_Num)
Me.DialogResult = System.Windows.Forms.DialogResult.OK
Me.Close()
End Sub
......@@ -175,7 +170,6 @@ Public Class OptionDialog
cbo面积精度.Text = "0.000001"
End Select
txt图号映射.Text = Map_Mir_StochNum
txt文件名映射.Text = Map_Mir_PartName
txt比例.Text = Map_DrawingScale
......@@ -261,4 +255,4 @@ Public Class OptionDialog
End If
End With
End Sub
End Class
End Class
\ No newline at end of file
......@@ -8,9 +8,6 @@ Imports System.Collections.ObjectModel
Imports stdole
Imports System.Drawing
Public Class PrintIPWDialog
'批量打印开始
......@@ -65,7 +62,6 @@ Public Class PrintIPWDialog
ListView1.Items.Clear()
SetStatusBarText("批量打印工程图完成")
End Sub
'关闭
......@@ -75,7 +71,6 @@ Public Class PrintIPWDialog
Me.Close()
End Sub
'添加文件
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
......@@ -137,7 +132,6 @@ Public Class PrintIPWDialog
End Sub
'打印文档,打印机名称
Private Sub PrintDrawing(ByVal IdwDoc As DrawingDocument, ByVal sPrinterName As String)
......@@ -151,7 +145,7 @@ Public Class PrintIPWDialog
' Get the name of the printer that will be used.
.Printer = sPrinterName
'所有颜色打印为黑色
'所有颜色打印为黑色
If CheckBox1.Checked = True Then
.AllColorsAsBlack = True
Else
......@@ -171,9 +165,8 @@ Public Class PrintIPWDialog
'设置为默认纸张大小
' 如果是打印到打印机,修正为A3
If CheckBox3.Checked = True Then
If CheckBox3.Checked = True Then
Select Case IdwDoc.ActiveSheet.Size
Case DrawingSheetSizeEnum.kA4DrawingSheetSize
.PaperSize = PaperSizeEnum.kPaperSizeA4
......@@ -214,8 +207,6 @@ Public Class PrintIPWDialog
.Orientation = PrintOrientationEnum.kPortraitOrientation
End Select
' Set to print all sheets.
.PrintRange = PrintRangeEnum.kPrintAllSheets
......@@ -258,24 +249,20 @@ Public Class PrintIPWDialog
End If
End With
' 获取所有引用文档
' 获取所有引用文档
Dim oRefDocs As DocumentsEnumerator
oRefDocs = AssDoc.AllReferencedDocuments
' 遍历这些文档
' 遍历这些文档
Dim oRefDoc As Document
For Each oRefDoc In oRefDocs
Dim FullFileName As String
FullFileName = oRefDoc.FullDocumentName
Dim IdwFullFileName As String
IdwFullFileName = GetNewExtensionFileName(FullFileName, ".idw")
If IsFileExsts(IdwFullFileName) = False Then '跳过不存在的文件
GoTo 999
End If
......@@ -289,8 +276,6 @@ Public Class PrintIPWDialog
999:
Next
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
......@@ -328,5 +313,4 @@ Public Class PrintIPWDialog
End Try
End Sub
End Class
End Class
\ No newline at end of file
......@@ -77,12 +77,11 @@ Public Class SaveAsDialog
'关闭
Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
ListBox1.Items .Clear
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.Close()
ListBox1.Items.Clear()
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.Close()
End Sub
'添加文件
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'打开文件
......@@ -139,5 +138,4 @@ Public Class SaveAsDialog
End Sub
End Class
End Class
\ No newline at end of file
......@@ -65,4 +65,4 @@ Public Class SignDialog
End Select
End Sub
End Class
End Class
\ No newline at end of file
......@@ -12,13 +12,11 @@ Public Class iPopertiesDialog
Private oOption As enumPType = enumPType.eString
Private oUserPropertySet As Inventor.PropertySet
Private PropID As Long = 0
Public Sub getUserPropertySet(ByVal oUSet As Inventor.PropertySet)
'获得缺省的自定义特性集
oUserPropertySet = oUSet
......@@ -43,7 +41,7 @@ Public Class iPopertiesDialog
Dim InventorDoc As Inventor.Document
For Each InventorDoc In ThisApplication.Documents
Select InventorDoc.DocumentType
Select Case InventorDoc.DocumentType
Case DocumentTypeEnum.kDrawingDocumentObject, DocumentTypeEnum.kAssemblyDocumentObject, DocumentTypeEnum.kPartDocumentObject
ListBox1.Items.Add(InventorDoc.FullDocumentName)
End Select
......@@ -70,7 +68,6 @@ Public Class iPopertiesDialog
'oDesignerProp = oDTProps.Item("Designer")
'Debug.Print(oDesignerProp.DisplayName & " = " & oDesignerProp.Value)
'用显示名 displayname 的代码
'定义单个项目
Dim oDesignerProp As Inventor.Property
......@@ -107,17 +104,17 @@ Public Class iPopertiesDialog
Dim pEachScale As Inventor.Property
'Try
' '若该iProperty已经存在,则直接修改其值
' '若该iProperty已经存在,则直接修改其值
' pEachScale = IdwDoc.PropertySets.Item("User Defined Properties").Item(Map_PrintDay)
' pEachScale.Value = Print_Day
'Catch
' ' 若该iProperty不存在,则添加一个
' ' 若该iProperty不存在,则添加一个
' IdwDoc.PropertySets.Item("User Defined Properties").Add(Print_Day, Map_PrintDay)
'End Try
'Try
'若该iProperty已经存在,则直接修改其值
'若该iProperty已经存在,则直接修改其值
pEachScale = InventorDoc.PropertySets.Item("User Defined Properties").Item(PropertyName.Text)
Select Case oOption
Case enumPType.eString
......@@ -131,7 +128,7 @@ Public Class iPopertiesDialog
End Select
'Catch
' 若该iProperty不存在,则添加一个
' 若该iProperty不存在,则添加一个
Select Case oOption
Case enumPType.eString
InventorDoc.PropertySets.Item("User Defined Properties").Add(StringP.Text, PropertyName.Text, PropID)
......@@ -203,4 +200,4 @@ Public Class iPopertiesDialog
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox1.Items.Clear()
End Sub
End Class
End Class
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>
</PublishUrlHistory>
<InstallUrlHistory>
</InstallUrlHistory>
<SupportUrlHistory>
</SupportUrlHistory>
<UpdateUrlHistory>
</UpdateUrlHistory>
<BootstrapperUrlHistory>
</BootstrapperUrlHistory>
<FallbackCulture>zh-CN</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartAction>Program</StartAction>
<StartProgram>C:\Program Files\Autodesk\Inventor 2015\Bin\Inventor.exe</StartProgram>
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<StartWorkingDirectory>
</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<StartAction>Program</StartAction>
<StartProgram>C:\Program Files\Autodesk\Inventor 2015\Bin\Inventor.exe</StartProgram>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<StartAction>Program</StartAction>
<StartProgram>C:\Program Files\Autodesk\Inventor 2015\Bin\Inventor.exe</StartProgram>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -191,7 +191,6 @@ Module BasicFileSystem
End If
End Function
'删除一个文件(文件名,是否删除到回收站选项)
Public Function DelFile(ByVal FullFileName As String, ByVal RecycleOption As FileIO.RecycleOption) As Boolean
If IsFileExsts(FullFileName) Then
......@@ -290,7 +289,6 @@ Module BasicFileSystem
'按文件删除,速度太慢,改为直接删除文件夹
'Dim strFile As String() = System.IO.Directory.GetFiles(strDir(i))
'For Each f As String In strFile
' SetStatusBarText(f)
' Select Case DeletePermanently
......@@ -307,7 +305,6 @@ Module BasicFileSystem
directoryname = inf.FullName
SetStatusBarText(directoryname)
Select Case DeletePermanently
Case True '永久删除
DelFolder(directoryname, FileIO.RecycleOption.DeletePermanently)
......@@ -316,8 +313,6 @@ Module BasicFileSystem
DelFolder(directoryname, FileIO.RecycleOption.SendToRecycleBin)
End Select
End If
DelOldFile(strDir(i), DeletePermanently)
Next
......@@ -357,4 +352,4 @@ Module BasicFileSystem
End If
End Sub
End Module
End Module
\ No newline at end of file
Module BiaoQingBao
Private biaoqingbao As String() = {"", "(´⊙ω⊙`)!", "ʕ⊙ᴥ⊙ʔ", "╰(◕﹏◕)つ", "ʕ ͡°̲ (oo) ͡°̲ ʔ", "୧༼◔益◔╭∩╮༽", "╭∩╮໒(✪ਊ✪)७╭∩╮", "︻╦̵̵͇̿̿̿̿══╤─", _
"(▀̿ ̿ -▀̿ ̿ )つ├┬┴┬┴", "ε=(・д・`*)ハァ…", "(:ㄏ■ Д ■ :)ㄏ", "(>﹏<。)~呜呜呜……", "w(@。@;)w", "óÔÔò ʕ·͡ᴥ·ʔ óÔÔò", _
"ˋのˊ I LǒvのYoひ" & vbCrLf & " ˊˋ ㄖ你爱我 =__我爱你〆 " & vbCrLf & "╭~~~╮ ╭ ﹌╮" & vbCrLf & "(=^.^=) (o.o)" & vbCrLf & "(~)ǒ(~) (~)ǒ(~) 石头--剪子--布~你输了~罚你爱我一辈子!~~~ ", _
" |||||||||||||" & vbCrLf & "╭| ━ ━ |╮" & vbCrLf & "╰| • • |╯找女朋友中……………………" & vbCrLf & " ╰╭╮-╭╮╯"}
Public Function GetBiaoQing() As String
Dim strlength As Integer
Dim i As Integer
......@@ -17,6 +15,4 @@
End Function
End Module
End Module
\ No newline at end of file
此差异已折叠。
......@@ -4,7 +4,6 @@ Module NewUpdater
Const InNewVisonTXT As String = "\\Likai-pc\发行版\2011\NewVersion.txt"
Const GitWeb As String = "https://codechina.csdn.net/leaky114/inventoraddin"
Public Sub UpDater1()
Try
......@@ -28,7 +27,6 @@ Module NewUpdater
Catch ex As Exception
'MsgBox(ex.Message)
End Try
......@@ -52,7 +50,6 @@ Module NewUpdater
'MsgBox(MyVersion)
If NewVersion <> "" Then
Dim shortMyversion As Long
Dim shortNewVersion As Long
......@@ -91,4 +88,4 @@ Module NewUpdater
Return ShortVersion
End Function
End Module
End Module
\ No newline at end of file
......@@ -53,7 +53,7 @@ Module StringsModel
GetStockNumPartName.IsGet = False
GetStockNumPartName.StockNum = ""
GetStockNumPartName.PartName = FileName
GetStockNumPartName.partNum = ""
GetStockNumPartName.PartNum = ""
'MsgBox(FullFileName & " 无图号!", MsgBoxStyle.Information)
Case s = "" '无汉字
GetStockNumPartName.IsGet = False
......@@ -87,4 +87,4 @@ Module StringsModel
Return strReturn
End Function
End Module
End Module
\ No newline at end of file
......@@ -9,12 +9,13 @@ Module excelcode
'VLOOKUP (lookup_value, table_array, col_index_num, [range_lookup])
Public Function VLookUpValue(ByVal oExcel_File_Name As String, ByVal oStochNum As String, ByVal oSheet_Name As String, _
ByVal oTable_Array As String, ByVal oCol_Index_Nums As String, ByVal oRange_LookUp As Integer) As String
ByVal oTable_Array As String, ByVal oCol_Index_Num As String, ByVal oRange_LookUp As Integer) As String
VLookUpValue = Nothing
Dim excelApp As Excel.Application
excelApp = New Excel.Application
excelApp.Visible = True
Dim wb As Excel.Workbook = excelApp.Workbooks.Open(oExcel_File_Name)
Dim sht As Excel.Worksheet
sht = wb.Sheets(Sheet_Name)
......@@ -22,27 +23,24 @@ Module excelcode
Dim userange As Excel.Range
userange = sht.Range(oTable_Array)
Dim oCol_Index_Num(9) As String
'Dim oCol_Index_Num(10) As String
ReDim oCol_Index_Num(4)
'oCol_Index_Num = Split(oCol_Index_Nums, ",")
oCol_Index_Num = Split(oCol_Index_Nums, ",")
For Each a In oCol_Index_Num
VLookUpValue = excelApp.WorksheetFunction.VLookup(oStochNum, userange, oCol_Index_Num, oRange_LookUp)
If VLookUpValue <> Nothing Then
wb.Close()
excelApp.Quit()
Return VLookUpValue
End If
Next
'For Each a In oCol_Index_Num
VLookUpValue = excelApp.WorksheetFunction.VLookup(oStochNum, userange, oCol_Index_Num, oRange_LookUp)
If VLookUpValue <> Nothing Then
wb.Close()
excelApp.Quit()
Return VLookUpValue
End If
'Next
'关闭文件
wb.Close()
' 8.退出Excel程序
excelApp.Quit()
'9.释放资源
System.Runtime.InteropServices.Marshal.ReleaseComObject(userange)
System.Runtime.InteropServices.Marshal.ReleaseComObject(sht)
......@@ -50,11 +48,9 @@ Module excelcode
System.Runtime.InteropServices.Marshal.ReleaseComObject(excelApp)
'方法来源 https://blog.csdn.net/hsyj_0001/article/details/7686364
Return VLookUpValue
End Function
End Module
End Module
\ No newline at end of file
B'设置为一个动作,可一次撤销
......

Friend Class PictureConverter
Friend Class PictureConverter
Inherits System.Windows.Forms.AxHost
Private Sub New()
......@@ -10,4 +9,4 @@ Friend Class PictureConverter
ByVal image As System.Drawing.Image) As stdole.IPictureDisp
Return CType(GetIPictureDispFromPicture(image), stdole.IPictureDisp)
End Function
End Class
End Class
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册