The components in the assembly context 'do not know' and 'cannot know' about their representations in any drawings. What you need to do is to find the components in the drawings (not from referenced model). Please check this example: http://help.solidworks.com/2013/English/api/sldworksapi/get_components_in_drawing_view_example_csharp.htm
Artem Taturevych, Application Engineer at Intercad (Australia)
translationXpert – add-in to translate SolidWorks models
myIntercad – an integrated tool for SolidWorks Professionals
Thanks for the quick response.Artem. I think the sample you provided only knows about the DrawingDocuments inside the direct parent . How about the visible compoents which are part of subassembly? Would the call to View.GetVisbleComponents returns all the components all accros( sub-assembly /second-sub assembly/another sub assemb for ex ?
More specifically i were to change visible line styles in a sub-assembly how would i go for it ?
I tried one sample and for the sample it worked. But for my actual case, the view.RootDrawingComp appraoch is only providing me
parent sub assembly where as view.GetVisibleComponent goes into sub assembly and find the comp i am looking for. the problem is-
the component it finds is instance of Component2. I need instance of DrawingComponent so that i can change line property on drawing component