Part = (ModelDoc2)swApp.ActiveDoc;
Sorry It won't work.
I even tried to use (SldWorks.ModelDoc2), and tried to add in that very long
I also tried to use (SolidWorks.Interop.sldworks.ModelDoc2)
But nothing works.
Can you kindly post a few sample codes including the "using" line(simple code to just change some dimension will be good enough), and also kindly help me on which reference file should I actually add?
Did you want to get the active document or ACTIVATE as specific file... I think you have these two confused. See examples below.
//Re-activate the assembly so that you can add the component to it
swModel = (ModelDoc2)swApp.ActivateDoc2(AssemblyTitle, true, ref errors);
swModel = (ModelDoc2)swApp.ActiveDoc;
This examples uses both:
Thank you, finally get solved. I should have been more careful