I have a drawing with multiple views, the assembly that the drawing was created from has some components that are not shown via an extrude-cut feature, they are not hidden or suppressed in the feature tree but they are not visible in the mode view. When I use:
swThisView.GetVisibleComponents();
It returns everything, all the components even though they are not in the drawing view. This is how I get my drawing views:
internal List
swGetAllDwgViews() {
List
lstSwViews = new List (); try
{
object[] swAllDwgViews = (_swDwgDoc.GetCurrentSheet()).GetViews() as object[];
if (swAllDwgViews != null)
{
foreach (View swDwgView in swAllDwgViews)
{
lstSwViews.Add(swDwgView);
}
}
return lstSwViews;
}
catch (Exception ex)
{
return lstSwViews;
}
}
I've tried going directly to the RootComponent of the drawing view and processing it that way but I still get all the components, including those hidden by the extrude cut feature.
SolidworksApi macros