Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
leaky114
inventoraddin
提交
4c602016
I
inventoraddin
项目概览
leaky114
/
inventoraddin
上一次同步 8 个月
通知
6
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
inventoraddin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4c602016
编写于
12月 03, 2021
作者:
leaky114
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
21.12.3
上级
7560c3b4
变更
25
显示空白变更内容
内联
并排
Showing
25 changed file
with
131 addition
and
310 deletion
+131
-310
AssemblyInfo.vb
AssemblyInfo.vb
+3
-3
Class/clsDrawSlot.vb
Class/clsDrawSlot.vb
+1
-7
Form/About.vb
Form/About.vb
+4
-6
Form/AllSaveAsDialog.vb
Form/AllSaveAsDialog.vb
+1
-3
Form/AutoPartNumberDialog.vb
Form/AutoPartNumberDialog.vb
+4
-11
Form/ChangeIpro.vb
Form/ChangeIpro.vb
+1
-2
Form/GetPartDialog.vb
Form/GetPartDialog.vb
+2
-5
Form/HanFengJiSuan.vb
Form/HanFengJiSuan.vb
+1
-1
Form/InputBoxDialog.vb
Form/InputBoxDialog.vb
+1
-1
Form/InventoryCoding.vb
Form/InventoryCoding.vb
+2
-8
Form/OptionDialog.Designer.vb
Form/OptionDialog.Designer.vb
+54
-54
Form/OptionDialog.vb
Form/OptionDialog.vb
+1
-7
Form/PrintIPWDialog.vb
Form/PrintIPWDialog.vb
+5
-21
Form/SaveAsDialog.vb
Form/SaveAsDialog.vb
+4
-6
Form/SignDialog.vb
Form/SignDialog.vb
+1
-1
Form/iPopertiesDialog.vb
Form/iPopertiesDialog.vb
+6
-9
InventorAddIn.vbproj.user
InventorAddIn.vbproj.user
+0
-34
Module/BasicFileSystem.vb
Module/BasicFileSystem.vb
+1
-6
Module/BiaoQingBao.vb
Module/BiaoQingBao.vb
+1
-5
Module/Inventorbasic.vb
Module/Inventorbasic.vb
+19
-93
Module/NewUpdater.vb
Module/NewUpdater.vb
+1
-4
Module/Strings.vb
Module/Strings.vb
+2
-2
Module/excelcode.vb
Module/excelcode.vb
+14
-18
StandardAddInServer.vb
StandardAddInServer.vb
+0
-0
cls/PictureConverter.vb
cls/PictureConverter.vb
+2
-3
未找到文件。
AssemblyInfo.vb
浏览文件 @
4c602016
Class/clsDrawSlot.vb
浏览文件 @
4c602016
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
)
...
...
Form/About.vb
浏览文件 @
4c602016
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
...
...
Form/AllSaveAsDialog.vb
浏览文件 @
4c602016
...
...
@@ -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
...
...
Form/AutoPartNumberDialog.vb
浏览文件 @
4c602016
...
...
@@ -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
)
...
...
@@ -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
)
...
...
Form/ChangeIpro.vb
浏览文件 @
4c602016
...
...
@@ -60,5 +60,4 @@ Public Class ChangeIproDialog
TextBox3
.
Text
=
Str_TempText
End
Sub
End
Class
\ No newline at end of file
Form/GetPartDialog.vb
浏览文件 @
4c602016
...
...
@@ -4,7 +4,6 @@ Imports Inventor.SelectTypeEnum
Imports
Inventor.DocumentTypeEnum
Imports
Inventor
Public
Class
GetPartDialog
'添加
...
...
@@ -38,7 +37,6 @@ Public Class GetPartDialog
'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
...
...
Form/HanFengJiSuan.vb
浏览文件 @
4c602016
Form/InputBoxDialog.vb
浏览文件 @
4c602016
Form/InventoryCoding.vb
浏览文件 @
4c602016
...
...
@@ -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
...
...
Form/OptionDialog.Designer.vb
浏览文件 @
4c602016
...
...
@@ -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
'
...
...
Form/OptionDialog.vb
浏览文件 @
4c602016
...
...
@@ -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
...
...
Form/PrintIPWDialog.vb
浏览文件 @
4c602016
...
...
@@ -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
)
...
...
@@ -171,7 +165,6 @@ Public Class PrintIPWDialog
'设置为默认纸张大小
' 如果是打印到打印机,修正为A3
If
CheckBox3
.
Checked
=
True
Then
Select
Case
IdwDoc
.
ActiveSheet
.
Size
...
...
@@ -214,8 +207,6 @@ Public Class PrintIPWDialog
.
Orientation
=
PrintOrientationEnum
.
kPortraitOrientation
End
Select
' Set to print all sheets.
.
PrintRange
=
PrintRangeEnum
.
kPrintAllSheets
...
...
@@ -258,8 +249,6 @@ Public Class PrintIPWDialog
End
If
End
With
' 获取所有引用文档
Dim
oRefDocs
As
DocumentsEnumerator
oRefDocs
=
AssDoc
.
AllReferencedDocuments
...
...
@@ -271,11 +260,9 @@ Public Class PrintIPWDialog
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
\ No newline at end of file
Form/SaveAsDialog.vb
浏览文件 @
4c602016
...
...
@@ -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
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
\ No newline at end of file
Form/SignDialog.vb
浏览文件 @
4c602016
Form/iPopertiesDialog.vb
浏览文件 @
4c602016
...
...
@@ -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
...
...
InventorAddIn.vbproj.user
已删除
100644 → 0
浏览文件 @
7560c3b4
<?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
Module/BasicFileSystem.vb
浏览文件 @
4c602016
...
...
@@ -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
...
...
Module/BiaoQingBao.vb
浏览文件 @
4c602016
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
\ No newline at end of file
Module/Inventorbasic.vb
浏览文件 @
4c602016
...
...
@@ -9,7 +9,6 @@ Imports System.Windows.Forms
Imports
Inventor.PrintOrientationEnum
Imports
System.Text
Module
InventorBasic
Public
Structure
StockNumPartName
...
...
@@ -57,11 +56,9 @@ Module InventorBasic
Public
Mass_Accuracy
As
String
'质量精度
Public
Area_Accuracy
As
String
'面积精度
Public
IsSetDrawingScale
As
String
'打开工程图时是否写 比例 到ipro 是赋值为1
Public
IsSetMass
As
String
'打开工程图时是否写 质量 到ipro 是赋值为1
Public
CheckUpdate
As
String
'启动检查更新
Public
TotalItem
As
Integer
'BOM序号
...
...
@@ -114,7 +111,6 @@ Module InventorBasic
' Exit Function
'End If
If
InStr
(
OldFullFileName
,
ContentCenterFiles
)
>
0
Then
'跳过零件库文件
MsgBox
(
"无法修改资源中心文件: "
&
OldFullFileName
,
MsgBoxStyle
.
Information
,
"修改文件名"
)
'OldInventorDoc.Close()
...
...
@@ -129,7 +125,6 @@ Module InventorBasic
'新图号
'frmain.Focus()
'取消输入
If
NewFileName
=
""
Then
Return
True
...
...
@@ -174,7 +169,6 @@ Module InventorBasic
'关闭旧图
OldInventorDocument
.
Close
()
'全部替换为新文件
If
MsgBox
(
"是否替换全部零件?"
,
MsgBoxStyle
.
YesNo
+
MsgBoxStyle
.
Question
+
MsgBoxStyle
.
SystemModal
+
MsgBoxStyle
.
DefaultButton1
)
=
MsgBoxResult
.
Yes
Then
OldComponentOccurrence
.
Replace
(
NewFullFileName
,
True
)
...
...
@@ -254,7 +248,6 @@ Module InventorBasic
' Exit Function
'End If
If
InStr
(
OldFullFileName
,
ContentCenterFiles
)
>
0
Then
'跳过零件库文件
MsgBox
(
OldFullFileName
&
"为零件库文件"
,
MsgBoxStyle
.
Information
)
'OldInventorDoc.Close()
...
...
@@ -319,7 +312,6 @@ Module InventorBasic
'全部替换为新文件
If
MsgBox
(
"是否替换全部零件?"
,
MsgBoxStyle
.
YesNo
+
MsgBoxStyle
.
Question
+
MsgBoxStyle
.
SystemModal
)
=
MsgBoxResult
.
Yes
Then
MsgBox
(
"选择 "
&
NewFullFileName
&
" 的基础文件!"
)
OldComponentOccurrence
.
Replace
(
NewFullFileName
,
True
)
...
...
@@ -388,7 +380,6 @@ Module InventorBasic
Return
True
End
Function
'修改部件包含文件的iProperty ( 部件文件对象 ; 文件是否需打开,打开的文件用后要关闭)
Public
Function
SetDocumentsInAssIpropertyFromFileName
(
ByVal
oAssemblyDocument
As
AssemblyDocument
,
ByVal
IsNeedClose
As
Boolean
)
As
Boolean
' 获取所有引用文档
...
...
@@ -467,7 +458,6 @@ Module InventorBasic
SetDocumentIpropertyFromFileName
(
oInventorDocument
,
True
)
'设置Iproperty,打开文件后需关闭
'遍历下一级
If
(
Not
oBOMRow
.
ChildRows
Is
Nothing
)
And
FirstLevelOnly
=
False
Then
Call
QueryBOMRowToSetiPro
(
oBOMRow
.
ChildRows
,
FirstLevelOnly
)
...
...
@@ -481,7 +471,6 @@ Module InventorBasic
End
Sub
'自动生成零件图号(部件文件对象;进度条)
Public
Function
AutoSetPartNumber
(
ByVal
oAssemblyDocument
As
AssemblyDocument
)
As
Boolean
'With ProgressBar
...
...
@@ -548,7 +537,6 @@ Module InventorBasic
Exit
Function
End
If
'重命名还是续命名
Dim
PartNumberItem
As
Integer
'第几个零件文件
Dim
AssNumberItem
As
Integer
'第几个部件文件
...
...
@@ -584,7 +572,6 @@ Module InventorBasic
PartNumberItem
=
0
End
If
Dim
OldComponentOccurrence
As
ComponentOccurrence
'选择的部件或零件
Dim
OldInventorDocument
As
Document
'旧的文档
...
...
@@ -597,7 +584,6 @@ Module InventorBasic
Dim
NewFileName
As
String
'新的文档名
Dim
NewStockNum
As
String
=
Nothing
'新的图号
' 获取所有引用文档
Dim
oDocumentsEnumerator
As
DocumentsEnumerator
oDocumentsEnumerator
=
oAssemblyDocument
.
ReferencedDocuments
...
...
@@ -610,7 +596,6 @@ Module InventorBasic
Exit
Do
End
If
OldFullFileName
=
OldComponentOccurrence
.
ReferencedDocumentDescriptor
.
FullDocumentName
'旧文件全文件名
OldFileInfo
=
GetFileNameInfo
(
OldFullFileName
)
OldFileName
=
OldFileInfo
.
ONlyName
'旧文件 仅文件名
...
...
@@ -674,7 +659,6 @@ Module InventorBasic
NewInventorDocument
=
ThisApplication
.
Documents
.
Open
(
NewFullFileName
,
False
)
'打开文件,不显示
SetDocumentIpropertyFromFileName
(
NewInventorDocument
,
False
)
'设置Iproperty,打开文件后需关闭
'是否有对应的工程图文件,同时复制后修改文件名和模型链接
Dim
OldIdwFullFileName
As
String
OldIdwFullFileName
=
GetNewExtensionFileName
(
OldFullFileName
,
".idw"
)
'旧工程图
...
...
@@ -683,8 +667,6 @@ Module InventorBasic
NewIdwFullFileName
=
GetNewExtensionFileName
(
NewFullFileName
,
".idw"
)
'新工程图
FileSystem
.
FileCopy
(
OldIdwFullFileName
,
NewIdwFullFileName
)
'复制为新工程图
Dim
TempFullFileName
As
String
'暂时更改旧文件名字
TempFullFileName
=
OldFullFileName
&
".old"
ReFileName
(
OldFullFileName
,
TempFullFileName
)
...
...
@@ -698,7 +680,6 @@ Module InventorBasic
End
If
Else
MsgBox
(
OldFullFileName
&
"可能已有图号"
,
MsgBoxStyle
.
Information
)
End
If
...
...
@@ -783,7 +764,6 @@ Module InventorBasic
' 调用SaveCopyAs
Call
oTranslatorAddIn
.
SaveCopyAs
(
oDrawingDocument
,
oTranslationContext
,
options
,
oDataMedium
)
Return
DwgFullFileName
End
Function
...
...
@@ -819,15 +799,12 @@ Module InventorBasic
End
Select
End
If
InventorDocument
.
SaveAs
(
PdfFullFileName
,
True
)
Return
PdfFullFileName
End
Function
'设置工程图自定义比例
Public
Function
SetDrawingScale
(
ByVal
oDrawingDocument
As
DrawingDocument
)
As
Boolean
...
...
@@ -989,7 +966,6 @@ Module InventorBasic
Dim
oRef
As
DocumentDescriptor
oRef
=
oView
.
ReferencedDocumentDescriptor
'获取本零件文件夹路径
Dim
MirFile_FullFileName
As
String
Dim
ofd
As
New
OpenFileDialog
...
...
@@ -1006,7 +982,6 @@ Module InventorBasic
End
If
End
With
'获取镜像零件ipro
Dim
StockNumPartName
As
StockNumPartName
StockNumPartName
=
GetStockNumPartName
(
MirFile_FullFileName
)
...
...
@@ -1063,8 +1038,6 @@ Module InventorBasic
' Return True
'End Function
'设置签字
Public
Function
SetSign
(
ByVal
oDrawingDocument
As
DrawingDocument
,
ByVal
EngineerName
As
String
,
ByVal
Print_Day
As
String
,
ByVal
IsOPenPrintDialog
As
Boolean
)
As
Boolean
Dim
oPropSets
As
PropertySets
...
...
@@ -1114,7 +1087,6 @@ Module InventorBasic
End
Function
'获取单个描述
Public
Function
GetPropitem
(
ByVal
oInventorDocument
As
Inventor
.
Document
,
ByVal
propitemName
As
String
)
As
String
Dim
oPropSets
As
PropertySets
...
...
@@ -1139,7 +1111,6 @@ Module InventorBasic
End
Function
'设置单个propitem
Public
Function
SetPropitem
(
ByVal
oInventorDocument
As
Inventor
.
Document
,
ByVal
propitemName
As
String
,
ByVal
propitemValue
As
String
)
As
Boolean
Dim
oPropSets
As
PropertySets
...
...
@@ -1217,7 +1188,6 @@ Module InventorBasic
'新文件名
NewFileName
=
StockNumPartName
.
StockNum
&
StockNumPartName
.
PartName
'替换旧文件全名为新文件全名
NewFullFileName
=
GetNewFileName
(
OldFullFileName
,
NewFileName
)
...
...
@@ -1290,7 +1260,6 @@ Module InventorBasic
End
Select
End
Function
'设置序号
Public
Function
SetSerialNumber
(
ByVal
oDrawingDocument
As
DrawingDocument
)
As
Boolean
Dim
oActiveSheet
As
Sheet
...
...
@@ -1331,7 +1300,6 @@ Module InventorBasic
' i = i - 1
' Next
'点击每个序号组
Dim
oBalloon
As
Balloon
Do
...
...
@@ -1352,7 +1320,6 @@ Module InventorBasic
'检查序号完整性
Public
Function
CheckSerialNumber
(
ByVal
oDrawingDocument
As
DrawingDocument
)
As
Boolean
Dim
oActiveSheet
As
Sheet
oActiveSheet
=
oDrawingDocument
.
ActiveSheet
...
...
@@ -1384,7 +1351,6 @@ Module InventorBasic
Return
True
End
If
End
Function
Public
Function
InsertSerialNumber
(
ByVal
oDrawingDocument
As
DrawingDocument
)
As
Boolean
...
...
@@ -1429,7 +1395,6 @@ Module InventorBasic
Return
True
End
Function
'设置当前部件下级为虚拟件
Public
Function
SetBOMStructuret
(
ByVal
oAssemblyDocument
As
AssemblyDocument
)
As
Boolean
'设置结构类型
...
...
@@ -1459,7 +1424,6 @@ Module InventorBasic
' Set a reference to the "Structured" BOMView
'获取结构化的bom页面
For
Each
oBOMView
As
BOMView
In
oBOM
.
BOMViews
If
oBOMView
.
ViewType
=
BOMViewTypeEnum
.
kModelDataBOMViewType
Then
...
...
@@ -1536,7 +1500,6 @@ Module InventorBasic
Dim
oBOM
As
BOM
oBOM
=
oAssemblyDocument
.
ComponentDefinition
.
BOM
' Set the structured view to 'all levels'
oBOM
.
StructuredViewFirstLevelOnly
=
False
...
...
@@ -1545,7 +1508,6 @@ Module InventorBasic
' Set a reference to the "Structured" BOMView
'获取结构化的bom页面
For
Each
oBOMView
As
BOMView
In
oBOM
.
BOMViews
If
oBOMView
.
ViewType
=
BOMViewTypeEnum
.
kStructuredBOMViewType
Then
...
...
@@ -1557,7 +1519,6 @@ Module InventorBasic
End
Function
'检查模型是否有对应的工程图
Public
Sub
CheckIsInvHaveIdwSub
(
ByVal
oBOMRows
As
BOMRowsEnumerator
,
ByVal
StrInName
As
String
)
Dim
i
As
Long
...
...
@@ -1576,7 +1537,6 @@ Module InventorBasic
InventorFullName
=
oCompDef
.
Document
.
FullFileName
If
IsFileExsts
(
InventorFullName
)
=
False
Then
'跳过不存在的文件
GoTo
999
End
If
...
...
@@ -1611,7 +1571,6 @@ Module InventorBasic
Dim
oBOM
As
BOM
oBOM
=
oAssemblyDocument
.
ComponentDefinition
.
BOM
' Set the structured view to 'all levels'
oBOM
.
StructuredViewFirstLevelOnly
=
False
...
...
@@ -1632,7 +1591,6 @@ Module InventorBasic
End
Function
'打开部件中所有子集对应的工程图
Public
Sub
OpenAllDrwInAsmSub
(
ByVal
oBOMRows
As
BOMRowsEnumerator
,
ByVal
StockNum
As
String
)
Dim
i
As
Long
...
...
@@ -1679,7 +1637,6 @@ Module InventorBasic
End
Select
'遍历下一级
If
Not
oRow
.
ChildRows
Is
Nothing
Then
Call
OpenAllDrwInAsmSub
(
oRow
.
ChildRows
,
StockNum
)
...
...
@@ -1689,7 +1646,6 @@ Module InventorBasic
End
Sub
'打开活动文件对应的工程图
Public
Sub
OpenDrawingDocument
(
ByVal
oInventorDocument
As
Inventor
.
Document
)
...
...
@@ -1902,7 +1858,6 @@ Module InventorBasic
oBOMRowData
(
i
-
1
,
1
)
=
oBOMRows
.
Item
(
i
).
ReferencedFileDescriptor
.
FullFileName
Next
'冒泡排序()
Dim
Temp
As
String
'不定义变量类型,以自动适应数组Ar的类型
...
...
@@ -1924,7 +1879,6 @@ Module InventorBasic
oBOMRowData
(
j
,
1
)
=
oBOMRowData
(
j
+
1
,
1
)
oBOMRowData
(
j
+
1
,
1
)
=
Temp
Flag
=
True
'如果有排序行为,则设为 True
End
If
Next
...
...
@@ -1933,7 +1887,6 @@ Module InventorBasic
End
If
Next
'循环每一行
For
i
=
0
To
n
'文件指针
...
...
@@ -1943,8 +1896,6 @@ Module InventorBasic
'寻找指针的行,开始提取数据
For
j
=
1
To
oBOMRows
.
Count
Dim
oRow
As
BOMRow
oRow
=
oBOMRows
.
Item
(
j
)
...
...
@@ -1974,7 +1925,6 @@ Module InventorBasic
oPropSets
=
oInventorDocument
.
PropertySets
oPropSet
=
oPropSets
.
Item
(
3
)
Dim
Array_ColumnsTitle
()
As
String
Dim
Array_ColumnsTitleValue
()
As
String
Array_ColumnsTitle
=
Split
(
ColumnsTitle
,
"|"
)
...
...
@@ -2049,7 +1999,6 @@ Module InventorBasic
Threading
.
Thread
.
Sleep
(
200
)
End
Select
'集合数组数据
Dim
ColumnsTitleValue
As
String
ColumnsTitleValue
=
TotalItem
&
","
&
Join
(
Array_ColumnsTitleValue
,
","
)
...
...
@@ -2075,10 +2024,8 @@ Module InventorBasic
Exit
For
End
If
Next
j
Next
i
'Debug.Print("==================================")
...
...
@@ -2094,7 +2041,6 @@ Module InventorBasic
IOS2
.
WriteLine
(
""
)
IOS2
.
Close
()
For
i
=
1
To
oBOMRows
.
Count
' Get the current row.
Dim
PointItemNumber
As
String
...
...
@@ -2125,11 +2071,8 @@ Module InventorBasic
'数据操作
'========================================
'==========================================
'遍历下一级
If
(
Not
oRow
.
ChildRows
Is
Nothing
)
And
FirstLevelOnly
=
False
Then
Call
QueryBOMRowPropertieToExcel
(
ExcelFullFileName
,
oRow
.
ChildRows
,
FirstLevelOnly
,
ColumnsTitle
,
PointItemNumber
,
oRow
.
ItemQuantity
)
...
...
@@ -2139,10 +2082,8 @@ Module InventorBasic
Exit
For
End
If
Next
j
Next
i
88
:
...
...
@@ -2151,18 +2092,12 @@ Module InventorBasic
End
Sub
'保存文件时的事件
'Public Sub ThisApplicationEvents_OnOnSaveDocument(ByVal DocumentObject As Inventor._Document, _
' ByVal BeforeOrAfter As Inventor.EventTimingEnum, _
' ByVal Context As Inventor.NameValueMap, _
' ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles ThisApplicationEvents.OnSaveDocument
'End Sub
'打开文件时的事件
...
...
@@ -2237,7 +2172,6 @@ Module InventorBasic
Return
True
End
Function
'对齐XYZ平面
Public
Function
FlushXYZPlane
()
As
Boolean
...
...
@@ -2256,7 +2190,6 @@ Module InventorBasic
Exit
Function
End
If
Dim
oComponentOccurrence2
As
ComponentOccurrence
oComponentOccurrence2
=
ThisApplication
.
CommandManager
.
Pick
(
kAssemblyLeafOccurrenceFilter
,
"选择第二个部件或零件"
)
...
...
@@ -2295,7 +2228,6 @@ Module InventorBasic
Return
True
End
Function
'获取未读取的文件所在部件并打开该部件 ( 部件文件对象 ; 文件是否需打开,打开的文件用后要关闭)
Public
Function
GetUnkonwDocumentWithBOM
(
ByVal
AsmDoc
As
AssemblyDocument
,
ByVal
IsNeedClose
As
Boolean
)
As
Boolean
' 获取所有引用文档
...
...
@@ -2357,7 +2289,6 @@ Module InventorBasic
' GoTo 999
'End If
'文件不存在,就打开父级文件
If
IsFileExsts
(
FullFileName
)
=
False
Then
Dim
InventorDoc
As
Inventor
.
Document
...
...
@@ -2379,8 +2310,6 @@ Module InventorBasic
End
Sub
'尺寸精度圆整
Public
Function
SetDrawingDimPrecision
()
As
Boolean
Try
...
...
@@ -2400,7 +2329,6 @@ Module InventorBasic
Dim
oLinearGeneralDimension
As
LinearGeneralDimension
'选择的部件或零件
' 是否已经选择了尺寸
If
oDrawingDocument
.
SelectSet
.
Count
<>
0
Then
For
Each
oSelect
As
Object
In
oDrawingDocument
.
SelectSet
...
...
@@ -2418,11 +2346,9 @@ Module InventorBasic
End
If
Catch
ex
As
Exception
MsgBox
(
ex
.
Message
)
End
Try
End
Function
End
Module
\ No newline at end of file
Module/NewUpdater.vb
浏览文件 @
4c602016
...
...
@@ -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
...
...
Module/Strings.vb
浏览文件 @
4c602016
...
...
@@ -53,7 +53,7 @@ Module StringsModel
GetStockNumPartName
.
IsGet
=
False
GetStockNumPartName
.
StockNum
=
""
GetStockNumPartName
.
PartName
=
FileName
GetStockNumPartName
.
p
artNum
=
""
GetStockNumPartName
.
P
artNum
=
""
'MsgBox(FullFileName & " 无图号!", MsgBoxStyle.Information)
Case
s
=
""
'无汉字
GetStockNumPartName
.
IsGet
=
False
...
...
Module/excelcode.vb
浏览文件 @
4c602016
...
...
@@ -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_Num
s
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
'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
'
Next
'关闭文件
wb
.
Close
()
' 8.退出Excel程序
excelApp
.
Quit
()
'9.释放资源
System
.
Runtime
.
InteropServices
.
Marshal
.
ReleaseComObject
(
userange
)
System
.
Runtime
.
InteropServices
.
Marshal
.
ReleaseComObject
(
sht
)
...
...
@@ -55,6 +53,4 @@ Module excelcode
End
Function
End
Module
\ No newline at end of file
StandardAddInServer.vb
浏览文件 @
4c602016
B
'设置为一个动作,可一次撤销
...
...
cls/PictureConverter.vb
浏览文件 @
4c602016
Friend
Class
PictureConverter
Friend
Class
PictureConverter
Inherits
System
.
Windows
.
Forms
.
AxHost
Private
Sub
New
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录