AnsweredAssumed Answered

Inputting Excel values to change a Part dimension

Question asked by Rick Hayes on Jul 17, 2012
Latest reply on Jul 19, 2012 by Rick Hayes

How can I fix my red line of code below?

I get an Error 91 message.

 

 

 

Sub test1()

 

Dim Part As Object

 

'Get Solidworks window reference

Set swApp = GetObject(, "SldWorks.Application")

Set Part = swApp.ActiveDoc

 

'Dimension variables

Dim FullName As String

Dim PartName As String

Dim count As Long

Dim startrow As Long

Dim endrow As Long

Dim DimCol As String

Dim DimPathCol As String

Dim SketchPathCol As String

Dim PartPathCol As String

Dim ErrorMsg As String

 

FullName = Excel.Range(DimPathCol & count) & "@" & Excel.Range(SketchPathCol & count) & "@" & PartName

Part.Parameter(FullName).SystemValue = 10

    

'Rebuild the part after all dimensions are applied

Part.EditRebuild

Part.EditRebuild3

Part.ClearSelection

 

End Sub

Outcomes