Hi.
I encountered with the next problem. I need to do some work with features in drawing view. For this i start with the next code that determines component:
status = swDraw.ActivateView("Drawing View1");
status = swModelDocExt.SelectByID2("Drawing View1", "DRAWINGVIEW", 0, 0, 0, false, 0, null, 0);
swView = (View)swSelMgr.GetSelectedObject6(1, -1);
swRootDrawComp = (DrawingComponent)swView.RootDrawingComponent;
Component2 comp = swRootDrawComp.Component;
But "comp" always is NULL. I wanted to get features from this "comp". What i did wrong? And if there any else way to iterate thru features?
I thied this: http://help.solidworks.com/2012/English/api/sldworksapi/Get_Components_in_Drawing_View_Example_CSharp.htm
But it is works for assemblies, but i have a part with no Child components...
I will be grateful for any advices!
SolidworksApi macros