I been looking at the "EDrawingsConsole" VB sample for ananswer on how to update the components list on the seconed drawingloaded. The code works fine for the first drawing but when you loadthe seconed or third drawing the componets list reloads thecomponents from the first drawing loaded.
As you can see lb_Components gets cleared before its reloaded.
Any Ideas??
Thanks
Private Sub RefreshComponentList()
Dim ccount As Integer
ccount = AxEModelViewControl1.get_ComponentCount("")
lb_Components.Items.Clear()
Dim i As Integer
For i = 0 To ccount - 1
lb_Components.Items.Add(AxEModelViewControl1.get_ComponentName("",i))
Next
End Sub
Private Sub RefreshConfigurationList()
lb_sheets_configs.Items.Clear()
Dim conCount As Integer
conCount = AxEModelViewControl1.ConfigurationCount
Dim i As Integer
For i = 0 To conCount - 1
lb_sheets_configs.Items.Add(AxEModelViewControl1.get_ConfigurationName(i))
Next
End Sub
SolidworksApi macros
As you can see lb_Components gets cleared before its reloaded.
Any Ideas??
Thanks
Private Sub RefreshComponentList()
Dim ccount As Integer
ccount = AxEModelViewControl1.get_ComponentCount("")
lb_Components.Items.Clear()
Dim i As Integer
For i = 0 To ccount - 1
lb_Components.Items.Add(AxEModelViewControl1.get_ComponentName("",i))
Next
End Sub
Private Sub RefreshConfigurationList()
lb_sheets_configs.Items.Clear()
Dim conCount As Integer
conCount = AxEModelViewControl1.ConfigurationCount
Dim i As Integer
For i = 0 To conCount - 1
lb_sheets_configs.Items.Add(AxEModelViewControl1.get_ConfigurationName(i))
Next
End Sub
SolidworksApi macros