Tema: error 91
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/11/2008, 04:16
Avellaneda
Colaborador
 
Fecha de Ingreso: enero-2008
Ubicación: Unas veces aquí, otras veces allí
Mensajes: 1.482
Antigüedad: 16 años, 3 meses
Puntos: 37
Respuesta: error 91

Cita:
Iniciado por ebu Ver Mensaje
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 ?