Hello,
I'm having problems using the API to update a linked design table.
I want to reload values from the design table from a savedspreadsheet, but it only works when editing in the design tree.
Here's the code I'm using:
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
swApp.ActiveDoc.ActiveView.FrameState = 1
Set swDesignTable = Part.GetDesignTable()
retval = swDesignTable.UpdateModel()
retval = swDesignTable.UpdateFeature()
retval = swDesignTable.UpdateTable(True, swUpdateDesignTableAll)
End Sub
ThanksSolidworksApi macros







I'm having problems using the API to update a linked design table.
I want to reload values from the design table from a savedspreadsheet, but it only works when editing in the design tree.
Here's the code I'm using:
Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
swApp.ActiveDoc.ActiveView.FrameState = 1
Set swDesignTable = Part.GetDesignTable()
retval = swDesignTable.UpdateModel()
retval = swDesignTable.UpdateFeature()
retval = swDesignTable.UpdateTable(True, swUpdateDesignTableAll)
End Sub
ThanksSolidworksApi macros