I have VB6 Pro Edition, SolidWorks 2017 on Dell with Windows 7 64bite.
I’m looking for a Do Loop or SelectCase to iterate through the components in an assembly,
change the dimensions of each part (component) with an input box then force a rebuild
of the individual components and the assembly .
Private Sub Command2_Click()
Set swApp = CreateObject("SldWorks.Application") 'SldWorks
‘opens assembly in SolidWorks
Private Sub Command4_Click()
Set part = swApp.OpenDoc6("F:\SolidWorks 2017\API\BearingAssembly.SLDASM", 2, 0, "", longstatus, longwarnings)
Set part = swApp.ActiveDoc
Set swModel = swApp.ActiveDoc
‘this code works to change the dimension of the active component
‘to the valve of a textbox
‘but I cannot iterate to the other parts (components)
‘in order to change their dimensions
Private Sub Command3_Click()
The assembly has three components:
I hoped to use something like this:
I can redimension each component separately using several commandbuttons and textboxes
but I’m hoping to use an userform something like this, to input values into two textboxes to
rebuild the assembly and update the parts.
Retrieving data ...