solidworks-mcp-server 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/db/connection.d.ts.map +1 -1
- package/dist/db/connection.js.map +1 -1
- package/dist/knowledge/chromadb.js +1 -1
- package/dist/knowledge/chromadb.js.map +1 -1
- package/dist/resources/design-table.d.ts +16 -16
- package/dist/resources/design-table.d.ts.map +1 -1
- package/dist/resources/design-table.js +2 -2
- package/dist/resources/design-table.js.map +1 -1
- package/dist/resources/pdm.d.ts +43 -43
- package/dist/resources/pdm.d.ts.map +1 -1
- package/dist/resources/pdm.js +8 -8
- package/dist/resources/pdm.js.map +1 -1
- package/dist/solidworks/api.d.ts +14 -14
- package/dist/solidworks/api.d.ts.map +1 -1
- package/dist/solidworks/api.js +15 -15
- package/dist/solidworks/api.js.map +1 -1
- package/dist/tools/analysis.d.ts +4 -4
- package/dist/tools/analysis.d.ts.map +1 -1
- package/dist/tools/analysis.js +10 -15
- package/dist/tools/analysis.js.map +1 -1
- package/dist/tools/drawing.d.ts +5 -5
- package/dist/tools/drawing.d.ts.map +1 -1
- package/dist/tools/drawing.js +5 -5
- package/dist/tools/drawing.js.map +1 -1
- package/dist/tools/export.d.ts +4 -4
- package/dist/tools/export.d.ts.map +1 -1
- package/dist/tools/export.js +8 -8
- package/dist/tools/export.js.map +1 -1
- package/dist/tools/modeling.d.ts +1 -1
- package/dist/tools/modeling.d.ts.map +1 -1
- package/dist/tools/modeling.js +13 -13
- package/dist/tools/modeling.js.map +1 -1
- package/dist/tools/vba-advanced.d.ts +228 -0
- package/dist/tools/vba-advanced.d.ts.map +1 -0
- package/dist/tools/vba-advanced.js +787 -0
- package/dist/tools/vba-advanced.js.map +1 -0
- package/dist/tools/vba-assembly.d.ts +143 -0
- package/dist/tools/vba-assembly.d.ts.map +1 -0
- package/dist/tools/vba-assembly.js +588 -0
- package/dist/tools/vba-assembly.js.map +1 -0
- package/dist/tools/vba-drawing.d.ts +350 -0
- package/dist/tools/vba-drawing.d.ts.map +1 -0
- package/dist/tools/vba-drawing.js +695 -0
- package/dist/tools/vba-drawing.js.map +1 -0
- package/dist/tools/vba-file-management.d.ts +156 -0
- package/dist/tools/vba-file-management.d.ts.map +1 -0
- package/dist/tools/vba-file-management.js +655 -0
- package/dist/tools/vba-file-management.js.map +1 -0
- package/dist/tools/vba-part.d.ts +187 -0
- package/dist/tools/vba-part.d.ts.map +1 -0
- package/dist/tools/vba-part.js +516 -0
- package/dist/tools/vba-part.js.map +1 -0
- package/dist/tools/vba.d.ts +1037 -9
- package/dist/tools/vba.d.ts.map +1 -1
- package/dist/tools/vba.js +22 -7
- package/dist/tools/vba.js.map +1 -1
- package/dist/utils/logger.js +2 -2
- package/dist/utils/logger.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* VBA Generation for Assembly Operations
|
|
4
|
+
* Comprehensive SolidWorks assembly automation
|
|
5
|
+
*/
|
|
6
|
+
export const assemblyVBATools = [
|
|
7
|
+
{
|
|
8
|
+
name: 'vba_assembly_mates',
|
|
9
|
+
description: 'Generate VBA for creating assembly mates',
|
|
10
|
+
inputSchema: z.object({
|
|
11
|
+
mateType: z.enum([
|
|
12
|
+
'coincident', 'parallel', 'perpendicular', 'tangent', 'concentric',
|
|
13
|
+
'distance', 'angle', 'symmetric', 'width', 'path', 'linear_coupler',
|
|
14
|
+
'cam', 'gear', 'rack_pinion', 'screw', 'universal_joint'
|
|
15
|
+
]),
|
|
16
|
+
component1: z.string().describe('First component name'),
|
|
17
|
+
face1: z.string().describe('Face/edge/vertex on first component'),
|
|
18
|
+
component2: z.string().describe('Second component name'),
|
|
19
|
+
face2: z.string().describe('Face/edge/vertex on second component'),
|
|
20
|
+
distance: z.number().optional().describe('Distance in mm for distance mate'),
|
|
21
|
+
angle: z.number().optional().describe('Angle in degrees for angle mate'),
|
|
22
|
+
flip: z.boolean().optional(),
|
|
23
|
+
alignmentType: z.enum(['aligned', 'anti_aligned', 'closest']).optional()
|
|
24
|
+
}),
|
|
25
|
+
handler: (args) => {
|
|
26
|
+
const mateConstants = {
|
|
27
|
+
coincident: 'swMateCOINCIDENT',
|
|
28
|
+
parallel: 'swMatePARALLEL',
|
|
29
|
+
perpendicular: 'swMatePERPENDICULAR',
|
|
30
|
+
tangent: 'swMateTANGENT',
|
|
31
|
+
concentric: 'swMateCONCENTRIC',
|
|
32
|
+
distance: 'swMateDISTANCE',
|
|
33
|
+
angle: 'swMateANGLE',
|
|
34
|
+
symmetric: 'swMateSYMMETRIC',
|
|
35
|
+
cam: 'swMateCAMFOLLOWER',
|
|
36
|
+
gear: 'swMateGEAR',
|
|
37
|
+
rack_pinion: 'swMateRACKPINION',
|
|
38
|
+
screw: 'swMateSCREW'
|
|
39
|
+
};
|
|
40
|
+
return `
|
|
41
|
+
Sub CreateAssemblyMate_${args.mateType}()
|
|
42
|
+
Dim swApp As SldWorks.SldWorks
|
|
43
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
44
|
+
Dim swMate As SldWorks.Mate2
|
|
45
|
+
Dim swSelMgr As SldWorks.SelectionMgr
|
|
46
|
+
Dim mateError As Long
|
|
47
|
+
|
|
48
|
+
Set swApp = Application.SldWorks
|
|
49
|
+
Set swAssy = swApp.ActiveDoc
|
|
50
|
+
|
|
51
|
+
If swAssy Is Nothing Then
|
|
52
|
+
MsgBox "Please open an assembly document"
|
|
53
|
+
Exit Sub
|
|
54
|
+
End If
|
|
55
|
+
|
|
56
|
+
Set swSelMgr = swAssy.SelectionManager
|
|
57
|
+
|
|
58
|
+
' Clear selections
|
|
59
|
+
swAssy.ClearSelection2 True
|
|
60
|
+
|
|
61
|
+
' Select first entity
|
|
62
|
+
swAssy.Extension.SelectByID2 "${args.face1}@${args.component1}", "FACE", 0, 0, 0, False, 1, Nothing, 0
|
|
63
|
+
|
|
64
|
+
' Select second entity
|
|
65
|
+
swAssy.Extension.SelectByID2 "${args.face2}@${args.component2}", "FACE", 0, 0, 0, True, 1, Nothing, 0
|
|
66
|
+
|
|
67
|
+
' Create mate
|
|
68
|
+
${args.mateType === 'distance' ? `
|
|
69
|
+
Set swMate = swAssy.AddMate5( _
|
|
70
|
+
${mateConstants[args.mateType]}, _
|
|
71
|
+
${args.alignmentType === 'anti_aligned' ? 'swMateAlignANTI_ALIGNED' : 'swMateAlignALIGNED'}, _
|
|
72
|
+
${args.flip ? 'True' : 'False'}, _
|
|
73
|
+
${args.distance / 1000}, 0, 0, 0, 0, 0, 0, 0, _
|
|
74
|
+
False, False, 0, mateError)` : ''}
|
|
75
|
+
|
|
76
|
+
${args.mateType === 'angle' ? `
|
|
77
|
+
Set swMate = swAssy.AddMate5( _
|
|
78
|
+
${mateConstants[args.mateType]}, _
|
|
79
|
+
${args.alignmentType === 'anti_aligned' ? 'swMateAlignANTI_ALIGNED' : 'swMateAlignALIGNED'}, _
|
|
80
|
+
${args.flip ? 'True' : 'False'}, _
|
|
81
|
+
0, ${args.angle * Math.PI / 180}, 0, 0, 0, 0, 0, 0, _
|
|
82
|
+
False, False, 0, mateError)` : ''}
|
|
83
|
+
|
|
84
|
+
${!['distance', 'angle'].includes(args.mateType) ? `
|
|
85
|
+
Set swMate = swAssy.AddMate5( _
|
|
86
|
+
${mateConstants[args.mateType]}, _
|
|
87
|
+
${args.alignmentType === 'anti_aligned' ? 'swMateAlignANTI_ALIGNED' : 'swMateAlignALIGNED'}, _
|
|
88
|
+
${args.flip ? 'True' : 'False'}, _
|
|
89
|
+
0, 0, 0, 0, 0, 0, 0, 0, _
|
|
90
|
+
False, False, 0, mateError)` : ''}
|
|
91
|
+
|
|
92
|
+
If Not swMate Is Nothing Then
|
|
93
|
+
MsgBox "${args.mateType} mate created successfully"
|
|
94
|
+
swAssy.EditRebuild3
|
|
95
|
+
Else
|
|
96
|
+
MsgBox "Failed to create mate. Error code: " & mateError
|
|
97
|
+
End If
|
|
98
|
+
|
|
99
|
+
swAssy.ClearSelection2 True
|
|
100
|
+
End Sub`;
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'vba_assembly_components',
|
|
105
|
+
description: 'Generate VBA for inserting and managing components',
|
|
106
|
+
inputSchema: z.object({
|
|
107
|
+
operation: z.enum(['insert', 'replace', 'pattern', 'mirror', 'explode', 'dissolve']),
|
|
108
|
+
componentPath: z.string().optional().describe('Path to component file'),
|
|
109
|
+
componentName: z.string().optional().describe('Component name in assembly'),
|
|
110
|
+
configurationName: z.string().optional(),
|
|
111
|
+
position: z.object({
|
|
112
|
+
x: z.number(),
|
|
113
|
+
y: z.number(),
|
|
114
|
+
z: z.number()
|
|
115
|
+
}).optional(),
|
|
116
|
+
quantity: z.number().optional(),
|
|
117
|
+
patternType: z.enum(['linear', 'circular']).optional(),
|
|
118
|
+
spacing: z.number().optional().describe('Spacing in mm')
|
|
119
|
+
}),
|
|
120
|
+
handler: (args) => {
|
|
121
|
+
const operations = {
|
|
122
|
+
insert: `
|
|
123
|
+
Sub InsertComponent()
|
|
124
|
+
Dim swApp As SldWorks.SldWorks
|
|
125
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
126
|
+
Dim swComp As SldWorks.Component2
|
|
127
|
+
Dim swMathUtil As SldWorks.MathUtility
|
|
128
|
+
Dim swTransform As SldWorks.MathTransform
|
|
129
|
+
Dim transformData(15) As Double
|
|
130
|
+
|
|
131
|
+
Set swApp = Application.SldWorks
|
|
132
|
+
Set swAssy = swApp.ActiveDoc
|
|
133
|
+
|
|
134
|
+
If swAssy Is Nothing Then
|
|
135
|
+
MsgBox "Please open an assembly document"
|
|
136
|
+
Exit Sub
|
|
137
|
+
End If
|
|
138
|
+
|
|
139
|
+
Set swMathUtil = swApp.GetMathUtility
|
|
140
|
+
|
|
141
|
+
' Set transform matrix for position
|
|
142
|
+
transformData(0) = 1: transformData(1) = 0: transformData(2) = 0
|
|
143
|
+
transformData(3) = 0: transformData(4) = 1: transformData(5) = 0
|
|
144
|
+
transformData(6) = 0: transformData(7) = 0: transformData(8) = 1
|
|
145
|
+
transformData(9) = ${args.position?.x || 0} / 1000
|
|
146
|
+
transformData(10) = ${args.position?.y || 0} / 1000
|
|
147
|
+
transformData(11) = ${args.position?.z || 0} / 1000
|
|
148
|
+
transformData(12) = 1
|
|
149
|
+
|
|
150
|
+
Set swTransform = swMathUtil.CreateTransform(transformData)
|
|
151
|
+
|
|
152
|
+
' Insert component
|
|
153
|
+
Set swComp = swAssy.AddComponent5( _
|
|
154
|
+
"${args.componentPath}", _
|
|
155
|
+
swAddComponentConfigOptions_e.swAddComponentConfigOptions_CurrentSelectedConfig, _
|
|
156
|
+
"${args.configurationName || ''}", _
|
|
157
|
+
False, "", _
|
|
158
|
+
${args.position?.x || 0} / 1000, _
|
|
159
|
+
${args.position?.y || 0} / 1000, _
|
|
160
|
+
${args.position?.z || 0} / 1000)
|
|
161
|
+
|
|
162
|
+
If Not swComp Is Nothing Then
|
|
163
|
+
MsgBox "Component inserted: " & swComp.Name2
|
|
164
|
+
swAssy.EditRebuild3
|
|
165
|
+
Else
|
|
166
|
+
MsgBox "Failed to insert component"
|
|
167
|
+
End If
|
|
168
|
+
End Sub`,
|
|
169
|
+
replace: `
|
|
170
|
+
Sub ReplaceComponent()
|
|
171
|
+
Dim swApp As SldWorks.SldWorks
|
|
172
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
173
|
+
Dim swComp As SldWorks.Component2
|
|
174
|
+
Dim bRet As Boolean
|
|
175
|
+
|
|
176
|
+
Set swApp = Application.SldWorks
|
|
177
|
+
Set swAssy = swApp.ActiveDoc
|
|
178
|
+
|
|
179
|
+
If swAssy Is Nothing Then Exit Sub
|
|
180
|
+
|
|
181
|
+
' Select component to replace
|
|
182
|
+
swAssy.Extension.SelectByID2 "${args.componentName}", "COMPONENT", 0, 0, 0, False, 0, Nothing, 0
|
|
183
|
+
Set swComp = swAssy.SelectionManager.GetSelectedObject6(1, -1)
|
|
184
|
+
|
|
185
|
+
If Not swComp Is Nothing Then
|
|
186
|
+
' Replace component
|
|
187
|
+
bRet = swComp.Replace2("${args.componentPath}", "${args.configurationName || ''}", False, True)
|
|
188
|
+
|
|
189
|
+
If bRet Then
|
|
190
|
+
MsgBox "Component replaced successfully"
|
|
191
|
+
swAssy.EditRebuild3
|
|
192
|
+
Else
|
|
193
|
+
MsgBox "Failed to replace component"
|
|
194
|
+
End If
|
|
195
|
+
End If
|
|
196
|
+
End Sub`,
|
|
197
|
+
pattern: `
|
|
198
|
+
Sub CreateComponentPattern()
|
|
199
|
+
Dim swApp As SldWorks.SldWorks
|
|
200
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
201
|
+
Dim swFeat As SldWorks.Feature
|
|
202
|
+
Dim swLocalPattern As SldWorks.LocalLinearPatternFeatureData
|
|
203
|
+
|
|
204
|
+
Set swApp = Application.SldWorks
|
|
205
|
+
Set swAssy = swApp.ActiveDoc
|
|
206
|
+
|
|
207
|
+
If swAssy Is Nothing Then Exit Sub
|
|
208
|
+
|
|
209
|
+
' Select component(s) to pattern
|
|
210
|
+
swAssy.Extension.SelectByID2 "${args.componentName}", "COMPONENT", 0, 0, 0, False, 1, Nothing, 0
|
|
211
|
+
|
|
212
|
+
${args.patternType === 'linear' ? `
|
|
213
|
+
' Select direction references
|
|
214
|
+
swAssy.Extension.SelectByID2 "Right Plane", "PLANE", 0, 0, 0, True, 2, Nothing, 0
|
|
215
|
+
|
|
216
|
+
' Create linear pattern
|
|
217
|
+
Set swFeat = swAssy.FeatureManager.FeatureLinearPattern4( _
|
|
218
|
+
${args.quantity || 3}, ${(args.spacing || 50) / 1000}, _
|
|
219
|
+
1, 0, False, False, "NULL", "NULL", _
|
|
220
|
+
False, False, False, False, False, False, _
|
|
221
|
+
False, False, False, False, 0, 0)` : ''}
|
|
222
|
+
|
|
223
|
+
${args.patternType === 'circular' ? `
|
|
224
|
+
' Select axis
|
|
225
|
+
swAssy.Extension.SelectByID2 "Axis1", "AXIS", 0, 0, 0, True, 2, Nothing, 0
|
|
226
|
+
|
|
227
|
+
' Create circular pattern
|
|
228
|
+
Set swFeat = swAssy.FeatureManager.FeatureCircularPattern5( _
|
|
229
|
+
${args.quantity || 6}, ${2 * Math.PI / (args.quantity || 6)}, _
|
|
230
|
+
False, "NULL", False, True, False, False)` : ''}
|
|
231
|
+
|
|
232
|
+
If Not swFeat Is Nothing Then
|
|
233
|
+
MsgBox "Component pattern created: " & swFeat.Name
|
|
234
|
+
swAssy.EditRebuild3
|
|
235
|
+
End If
|
|
236
|
+
End Sub`,
|
|
237
|
+
explode: `
|
|
238
|
+
Sub CreateExplodedView()
|
|
239
|
+
Dim swApp As SldWorks.SldWorks
|
|
240
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
241
|
+
Dim swConfig As SldWorks.Configuration
|
|
242
|
+
Dim swExplodeView As SldWorks.ExplodedView
|
|
243
|
+
|
|
244
|
+
Set swApp = Application.SldWorks
|
|
245
|
+
Set swAssy = swApp.ActiveDoc
|
|
246
|
+
|
|
247
|
+
If swAssy Is Nothing Then Exit Sub
|
|
248
|
+
|
|
249
|
+
Set swConfig = swAssy.GetActiveConfiguration
|
|
250
|
+
|
|
251
|
+
' Create new exploded view
|
|
252
|
+
Set swExplodeView = swConfig.CreateExplodedView2("ExplodedView_${Date.now()}")
|
|
253
|
+
|
|
254
|
+
If Not swExplodeView Is Nothing Then
|
|
255
|
+
' Select components to explode
|
|
256
|
+
swAssy.Extension.SelectByID2 "${args.componentName}", "COMPONENT", 0, 0, 0, False, 0, Nothing, 0
|
|
257
|
+
|
|
258
|
+
' Add explode step
|
|
259
|
+
swExplodeView.AddExplodeStep _
|
|
260
|
+
${(args.position?.x || 100) / 1000}, _
|
|
261
|
+
${(args.position?.y || 0) / 1000}, _
|
|
262
|
+
${(args.position?.z || 0) / 1000}
|
|
263
|
+
|
|
264
|
+
MsgBox "Exploded view created"
|
|
265
|
+
swAssy.ShowExploded2 True
|
|
266
|
+
End If
|
|
267
|
+
End Sub`
|
|
268
|
+
};
|
|
269
|
+
return operations[args.operation] || 'Operation not supported';
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
name: 'vba_assembly_analysis',
|
|
274
|
+
description: 'Generate VBA for assembly analysis',
|
|
275
|
+
inputSchema: z.object({
|
|
276
|
+
analysisType: z.enum([
|
|
277
|
+
'interference', 'clearance', 'collision', 'mass_properties',
|
|
278
|
+
'hole_alignment', 'assembly_statistics', 'bom_export'
|
|
279
|
+
]),
|
|
280
|
+
components: z.array(z.string()).optional().describe('Components to analyze'),
|
|
281
|
+
outputPath: z.string().optional().describe('Path for results export'),
|
|
282
|
+
includeSubassemblies: z.boolean().optional().default(true),
|
|
283
|
+
treatCoincidentAsInterference: z.boolean().optional().default(false)
|
|
284
|
+
}),
|
|
285
|
+
handler: (args) => {
|
|
286
|
+
const analyses = {
|
|
287
|
+
interference: `
|
|
288
|
+
Sub CheckInterference()
|
|
289
|
+
Dim swApp As SldWorks.SldWorks
|
|
290
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
291
|
+
Dim swIntMgr As SldWorks.InterferenceDetectionMgr
|
|
292
|
+
Dim vInts As Variant
|
|
293
|
+
Dim i As Integer
|
|
294
|
+
Dim swInt As SldWorks.Interference
|
|
295
|
+
Dim vol As Double
|
|
296
|
+
|
|
297
|
+
Set swApp = Application.SldWorks
|
|
298
|
+
Set swAssy = swApp.ActiveDoc
|
|
299
|
+
|
|
300
|
+
If swAssy Is Nothing Then
|
|
301
|
+
MsgBox "Please open an assembly"
|
|
302
|
+
Exit Sub
|
|
303
|
+
End If
|
|
304
|
+
|
|
305
|
+
Set swIntMgr = swAssy.InterferenceDetectionManager
|
|
306
|
+
|
|
307
|
+
' Configure interference detection
|
|
308
|
+
swIntMgr.TreatCoincidenceAsInterference = ${args.treatCoincidentAsInterference ? 'True' : 'False'}
|
|
309
|
+
swIntMgr.TreatSubAssembliesAsComponents = ${args.includeSubassemblies ? 'False' : 'True'}
|
|
310
|
+
swIntMgr.IncludeMultibodyPartInterferences = True
|
|
311
|
+
swIntMgr.MakeInterferingPartsTransparent = True
|
|
312
|
+
|
|
313
|
+
${args.components && args.components.length > 0 ? `
|
|
314
|
+
' Select specific components
|
|
315
|
+
${args.components.map((comp) => `
|
|
316
|
+
swAssy.Extension.SelectByID2 "${comp}", "COMPONENT", 0, 0, 0, True, 0, Nothing, 0`).join('')}` : ''}
|
|
317
|
+
|
|
318
|
+
' Run interference detection
|
|
319
|
+
vInts = swIntMgr.GetInterferences
|
|
320
|
+
swIntMgr.Done
|
|
321
|
+
|
|
322
|
+
If Not IsEmpty(vInts) Then
|
|
323
|
+
MsgBox "Found " & UBound(vInts) + 1 & " interference(s)"
|
|
324
|
+
|
|
325
|
+
' Process each interference
|
|
326
|
+
For i = 0 To UBound(vInts)
|
|
327
|
+
Set swInt = vInts(i)
|
|
328
|
+
vol = swInt.Volume * 1000000000 ' Convert to mm³
|
|
329
|
+
|
|
330
|
+
Debug.Print "Interference " & i + 1 & ":"
|
|
331
|
+
Debug.Print " Component 1: " & swInt.Component1.Name2
|
|
332
|
+
Debug.Print " Component 2: " & swInt.Component2.Name2
|
|
333
|
+
Debug.Print " Volume: " & Format(vol, "0.00") & " mm³"
|
|
334
|
+
Next i
|
|
335
|
+
|
|
336
|
+
${args.outputPath ? `
|
|
337
|
+
' Export results
|
|
338
|
+
Dim fso As Object, file As Object
|
|
339
|
+
Set fso = CreateObject("Scripting.FileSystemObject")
|
|
340
|
+
Set file = fso.CreateTextFile("${args.outputPath}", True)
|
|
341
|
+
|
|
342
|
+
file.WriteLine "Interference Detection Report"
|
|
343
|
+
file.WriteLine "============================="
|
|
344
|
+
file.WriteLine "Total Interferences: " & UBound(vInts) + 1
|
|
345
|
+
file.WriteLine ""
|
|
346
|
+
|
|
347
|
+
For i = 0 To UBound(vInts)
|
|
348
|
+
Set swInt = vInts(i)
|
|
349
|
+
file.WriteLine "Interference " & i + 1 & ":"
|
|
350
|
+
file.WriteLine " Component 1: " & swInt.Component1.Name2
|
|
351
|
+
file.WriteLine " Component 2: " & swInt.Component2.Name2
|
|
352
|
+
file.WriteLine " Volume: " & Format(swInt.Volume * 1000000000, "0.00") & " mm³"
|
|
353
|
+
file.WriteLine ""
|
|
354
|
+
Next i
|
|
355
|
+
|
|
356
|
+
file.Close
|
|
357
|
+
MsgBox "Report exported to: " & "${args.outputPath}"` : ''}
|
|
358
|
+
Else
|
|
359
|
+
MsgBox "No interferences found"
|
|
360
|
+
End If
|
|
361
|
+
End Sub`,
|
|
362
|
+
mass_properties: `
|
|
363
|
+
Sub CalculateMassProperties()
|
|
364
|
+
Dim swApp As SldWorks.SldWorks
|
|
365
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
366
|
+
Dim swMass As SldWorks.MassProperty
|
|
367
|
+
Dim vCOG As Variant
|
|
368
|
+
Dim vMOI As Variant
|
|
369
|
+
Dim mass As Double
|
|
370
|
+
|
|
371
|
+
Set swApp = Application.SldWorks
|
|
372
|
+
Set swAssy = swApp.ActiveDoc
|
|
373
|
+
|
|
374
|
+
If swAssy Is Nothing Then Exit Sub
|
|
375
|
+
|
|
376
|
+
Set swMass = swAssy.Extension.CreateMassProperty
|
|
377
|
+
|
|
378
|
+
${args.components && args.components.length > 0 ? `
|
|
379
|
+
' Select specific components
|
|
380
|
+
swAssy.ClearSelection2 True
|
|
381
|
+
${args.components.map((comp) => `
|
|
382
|
+
swAssy.Extension.SelectByID2 "${comp}", "COMPONENT", 0, 0, 0, True, 0, Nothing, 0`).join('')}
|
|
383
|
+
|
|
384
|
+
' Calculate for selected components
|
|
385
|
+
swMass.UseSelectedOnly = True` : ''}
|
|
386
|
+
|
|
387
|
+
mass = swMass.Mass * 1000 ' Convert to grams
|
|
388
|
+
vCOG = swMass.CenterOfMass
|
|
389
|
+
vMOI = swMass.GetMomentOfInertia(0) ' At COG
|
|
390
|
+
|
|
391
|
+
' Display results
|
|
392
|
+
MsgBox "Mass Properties:" & vbCrLf & _
|
|
393
|
+
"Mass: " & Format(mass, "0.00") & " g" & vbCrLf & _
|
|
394
|
+
"Volume: " & Format(swMass.Volume * 1000000000, "0.00") & " mm³" & vbCrLf & _
|
|
395
|
+
"Density: " & Format(swMass.Density, "0.00") & " kg/m³" & vbCrLf & _
|
|
396
|
+
"Surface Area: " & Format(swMass.SurfaceArea * 1000000, "0.00") & " mm²" & vbCrLf & vbCrLf & _
|
|
397
|
+
"Center of Gravity:" & vbCrLf & _
|
|
398
|
+
"X: " & Format(vCOG(0) * 1000, "0.00") & " mm" & vbCrLf & _
|
|
399
|
+
"Y: " & Format(vCOG(1) * 1000, "0.00") & " mm" & vbCrLf & _
|
|
400
|
+
"Z: " & Format(vCOG(2) * 1000, "0.00") & " mm"
|
|
401
|
+
|
|
402
|
+
${args.outputPath ? `
|
|
403
|
+
' Export to file
|
|
404
|
+
Dim fso As Object, file As Object
|
|
405
|
+
Set fso = CreateObject("Scripting.FileSystemObject")
|
|
406
|
+
Set file = fso.CreateTextFile("${args.outputPath}", True)
|
|
407
|
+
|
|
408
|
+
file.WriteLine "Mass Properties Report"
|
|
409
|
+
file.WriteLine "====================="
|
|
410
|
+
file.WriteLine "Mass: " & Format(mass, "0.00") & " g"
|
|
411
|
+
file.WriteLine "Volume: " & Format(swMass.Volume * 1000000000, "0.00") & " mm³"
|
|
412
|
+
file.WriteLine "Density: " & Format(swMass.Density, "0.00") & " kg/m³"
|
|
413
|
+
file.WriteLine "Surface Area: " & Format(swMass.SurfaceArea * 1000000, "0.00") & " mm²"
|
|
414
|
+
file.WriteLine ""
|
|
415
|
+
file.WriteLine "Center of Gravity:"
|
|
416
|
+
file.WriteLine " X: " & Format(vCOG(0) * 1000, "0.00") & " mm"
|
|
417
|
+
file.WriteLine " Y: " & Format(vCOG(1) * 1000, "0.00") & " mm"
|
|
418
|
+
file.WriteLine " Z: " & Format(vCOG(2) * 1000, "0.00") & " mm"
|
|
419
|
+
file.WriteLine ""
|
|
420
|
+
file.WriteLine "Moments of Inertia (at COG):"
|
|
421
|
+
file.WriteLine " Ixx: " & Format(vMOI(0), "0.0000") & " kg·m²"
|
|
422
|
+
file.WriteLine " Iyy: " & Format(vMOI(1), "0.0000") & " kg·m²"
|
|
423
|
+
file.WriteLine " Izz: " & Format(vMOI(2), "0.0000") & " kg·m²"
|
|
424
|
+
|
|
425
|
+
file.Close
|
|
426
|
+
MsgBox "Report saved to: " & "${args.outputPath}"` : ''}
|
|
427
|
+
End Sub`,
|
|
428
|
+
bom_export: `
|
|
429
|
+
Sub ExportBOM()
|
|
430
|
+
Dim swApp As SldWorks.SldWorks
|
|
431
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
432
|
+
Dim swBOMAnnotation As SldWorks.BomTableAnnotation
|
|
433
|
+
Dim swBOMFeature As SldWorks.BomFeature
|
|
434
|
+
Dim swTable As SldWorks.TableAnnotation
|
|
435
|
+
Dim i As Integer, j As Integer
|
|
436
|
+
Dim rowCount As Long, colCount As Long
|
|
437
|
+
|
|
438
|
+
Set swApp = Application.SldWorks
|
|
439
|
+
Set swAssy = swApp.ActiveDoc
|
|
440
|
+
|
|
441
|
+
If swAssy Is Nothing Then Exit Sub
|
|
442
|
+
|
|
443
|
+
' Create BOM
|
|
444
|
+
Set swBOMFeature = swAssy.FeatureManager.InsertBomTable3( _
|
|
445
|
+
"", "${args.outputPath || 'C:\\Temp\\BOM.xlsx'}", _
|
|
446
|
+
swBomType_e.swBomType_PartsOnly, _
|
|
447
|
+
"", _
|
|
448
|
+
swBOMConfigurationAnchorType_e.swBOMConfigurationAnchor_ActiveConfiguration, _
|
|
449
|
+
swBomStandard_e.swBomStandard_BomTable, _
|
|
450
|
+
False)
|
|
451
|
+
|
|
452
|
+
If Not swBOMFeature Is Nothing Then
|
|
453
|
+
Set swBOMAnnotation = swBOMFeature.GetTableAnnotations(0)
|
|
454
|
+
Set swTable = swBOMAnnotation
|
|
455
|
+
|
|
456
|
+
rowCount = swTable.RowCount
|
|
457
|
+
colCount = swTable.ColumnCount
|
|
458
|
+
|
|
459
|
+
' Export to Excel
|
|
460
|
+
Dim xlApp As Object
|
|
461
|
+
Dim xlBook As Object
|
|
462
|
+
Dim xlSheet As Object
|
|
463
|
+
|
|
464
|
+
Set xlApp = CreateObject("Excel.Application")
|
|
465
|
+
Set xlBook = xlApp.Workbooks.Add
|
|
466
|
+
Set xlSheet = xlBook.Sheets(1)
|
|
467
|
+
|
|
468
|
+
xlApp.Visible = True
|
|
469
|
+
|
|
470
|
+
' Write headers
|
|
471
|
+
For j = 0 To colCount - 1
|
|
472
|
+
xlSheet.Cells(1, j + 1).Value = swTable.GetColumnTitle(j)
|
|
473
|
+
Next j
|
|
474
|
+
|
|
475
|
+
' Write data
|
|
476
|
+
For i = 1 To rowCount - 1
|
|
477
|
+
For j = 0 To colCount - 1
|
|
478
|
+
xlSheet.Cells(i + 1, j + 1).Value = swTable.Text(i, j)
|
|
479
|
+
Next j
|
|
480
|
+
Next i
|
|
481
|
+
|
|
482
|
+
' Format
|
|
483
|
+
xlSheet.Range("A1").CurrentRegion.Columns.AutoFit
|
|
484
|
+
xlSheet.Range("A1").CurrentRegion.Borders.LineStyle = 1
|
|
485
|
+
|
|
486
|
+
${args.outputPath ? `
|
|
487
|
+
xlBook.SaveAs "${args.outputPath}"
|
|
488
|
+
MsgBox "BOM exported to: ${args.outputPath}"` : ''}
|
|
489
|
+
End If
|
|
490
|
+
End Sub`
|
|
491
|
+
};
|
|
492
|
+
return analyses[args.analysisType] || 'Analysis type not supported';
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
name: 'vba_assembly_configurations',
|
|
497
|
+
description: 'Generate VBA for managing assembly configurations',
|
|
498
|
+
inputSchema: z.object({
|
|
499
|
+
operation: z.enum(['create', 'modify', 'suppress', 'delete', 'copy']),
|
|
500
|
+
configName: z.string(),
|
|
501
|
+
parentConfig: z.string().optional(),
|
|
502
|
+
componentsToSuppress: z.array(z.string()).optional(),
|
|
503
|
+
properties: z.record(z.string()).optional(),
|
|
504
|
+
displayStates: z.array(z.string()).optional()
|
|
505
|
+
}),
|
|
506
|
+
handler: (args) => {
|
|
507
|
+
return `
|
|
508
|
+
Sub ManageConfiguration_${args.operation}()
|
|
509
|
+
Dim swApp As SldWorks.SldWorks
|
|
510
|
+
Dim swAssy As SldWorks.AssemblyDoc
|
|
511
|
+
Dim swConfig As SldWorks.Configuration
|
|
512
|
+
Dim swConfigMgr As SldWorks.ConfigurationManager
|
|
513
|
+
Dim bRet As Boolean
|
|
514
|
+
|
|
515
|
+
Set swApp = Application.SldWorks
|
|
516
|
+
Set swAssy = swApp.ActiveDoc
|
|
517
|
+
|
|
518
|
+
If swAssy Is Nothing Then
|
|
519
|
+
MsgBox "Please open an assembly"
|
|
520
|
+
Exit Sub
|
|
521
|
+
End If
|
|
522
|
+
|
|
523
|
+
Set swConfigMgr = swAssy.ConfigurationManager
|
|
524
|
+
|
|
525
|
+
${args.operation === 'create' ? `
|
|
526
|
+
' Create new configuration
|
|
527
|
+
Set swConfig = swAssy.AddConfiguration3( _
|
|
528
|
+
"${args.configName}", _
|
|
529
|
+
"Configuration created by VBA", _
|
|
530
|
+
"", _
|
|
531
|
+
swConfigurationOptions2_e.swConfigOption_LinkToParent + _
|
|
532
|
+
swConfigurationOptions2_e.swConfigOption_InheritProperties, _
|
|
533
|
+
"${args.parentConfig || ''}")
|
|
534
|
+
|
|
535
|
+
If Not swConfig Is Nothing Then
|
|
536
|
+
' Activate new configuration
|
|
537
|
+
swAssy.ShowConfiguration2 "${args.configName}"
|
|
538
|
+
|
|
539
|
+
${args.componentsToSuppress && args.componentsToSuppress.length > 0 ? `
|
|
540
|
+
' Suppress components
|
|
541
|
+
${args.componentsToSuppress.map((comp) => `
|
|
542
|
+
swAssy.Extension.SelectByID2 "${comp}", "COMPONENT", 0, 0, 0, True, 0, Nothing, 0`).join('')}
|
|
543
|
+
swAssy.EditSuppress2` : ''}
|
|
544
|
+
|
|
545
|
+
${args.properties ? `
|
|
546
|
+
' Set custom properties
|
|
547
|
+
${Object.entries(args.properties || {}).map(([key, value]) => `
|
|
548
|
+
swConfig.CustomPropertyManager.Add3 "${key}", swCustomInfoType_e.swCustomInfoText, "${value}", _
|
|
549
|
+
swCustomPropertyAddOption_e.swCustomPropertyReplaceValue`).join('')}` : ''}
|
|
550
|
+
|
|
551
|
+
MsgBox "Configuration '${args.configName}' created"
|
|
552
|
+
End If` : ''}
|
|
553
|
+
|
|
554
|
+
${args.operation === 'modify' ? `
|
|
555
|
+
' Get configuration
|
|
556
|
+
Set swConfig = swAssy.GetConfigurationByName("${args.configName}")
|
|
557
|
+
|
|
558
|
+
If Not swConfig Is Nothing Then
|
|
559
|
+
' Activate configuration
|
|
560
|
+
swAssy.ShowConfiguration2 "${args.configName}"
|
|
561
|
+
|
|
562
|
+
${args.componentsToSuppress && args.componentsToSuppress.length > 0 ? `
|
|
563
|
+
' Modify suppression state
|
|
564
|
+
${args.componentsToSuppress.map((comp) => `
|
|
565
|
+
swAssy.Extension.SelectByID2 "${comp}", "COMPONENT", 0, 0, 0, True, 0, Nothing, 0`).join('')}
|
|
566
|
+
swAssy.EditSuppress2` : ''}
|
|
567
|
+
|
|
568
|
+
MsgBox "Configuration '${args.configName}' modified"
|
|
569
|
+
Else
|
|
570
|
+
MsgBox "Configuration not found"
|
|
571
|
+
End If` : ''}
|
|
572
|
+
|
|
573
|
+
${args.operation === 'delete' ? `
|
|
574
|
+
' Delete configuration
|
|
575
|
+
bRet = swAssy.DeleteConfiguration2("${args.configName}")
|
|
576
|
+
|
|
577
|
+
If bRet Then
|
|
578
|
+
MsgBox "Configuration '${args.configName}' deleted"
|
|
579
|
+
Else
|
|
580
|
+
MsgBox "Failed to delete configuration"
|
|
581
|
+
End If` : ''}
|
|
582
|
+
|
|
583
|
+
swAssy.EditRebuild3
|
|
584
|
+
End Sub`;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
];
|
|
588
|
+
//# sourceMapping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