Cita:
Iniciado por ebu
hola!
al ejecuta el siguiente programa me da error 91.
Sub ConfigCargar()
Dim swRootComp As SldWorks.Component2
Set swApp = CreateObject("SldWorks.Application")
Set swModel = swApp.ActiveDoc
Set swConf = swModel.GetActiveConfiguration
Set swRootComp = swConf.GetRootComponent
TraverseComponent swRootComp, 1
End Sub
Public Sub TraverseComponent(swComp As SldWorks.Component2, nLevel As Long) 'swComp es tipo object
Dim vChildComp As Variant
vChildComp = swComp.GetChildren
Me explico: sw RootComp es un objeto q se manda al procedimiento TreverseComponent.Cuando le doy a ejecutar me marca en la fila amarilla un error 91:variable de objeto o bloque with no establecido.
alguien me puede ayudar? gracias!
Hola! no entiendo muy bien ese código, pero no debería ser
vChildComp = swRootComp.GetChildren ?