Hi Folks,
I am working in a drawing and looping through views - When I get to a View that has a part component it fails to get the Rootcomponent
The below code will process an assembly in the view but not a part in a view?
Can this be done?
How?
ss = swDraw.GetViews For SheetCount = LBound(ss) To UBound(ss) Dim vv As Object vv = ss(SheetCount) For viewCount = LBound(vv) To UBound(vv) Debug.Print(vv(viewCount).GetName2()) Debug.Print(vv(viewCount).Type()) Select Case vv(viewCount).Type() Case swDrawingViewTypes_e.swDrawingSheet Case swDrawingViewTypes_e.swDrawingSectionView Case swDrawingViewTypes_e.swDrawingDetailView Case swDrawingViewTypes_e.swDrawingProjectedView Case swDrawingViewTypes_e.swDrawingAuxiliaryView Case swDrawingViewTypes_e.swDrawingStandardView Case swDrawingViewTypes_e.swDrawingNamedView ' swDrawComp = swView.RootDrawingComponent swRootDrawComp = vv(viewCount).RootDrawingComponent() ProcessDrawingComponent(swRootDrawComp," ") Case swDrawingViewTypes_e.swDrawingRelativeView End Select Next viewCount Next SheetCount
Cheers,
SolidworksApi macros