1 Reply Latest reply on Mar 30, 2014 8:34 PM by Artem Taturevych

    castin swaddin

    Javad Kabrasian

      hi everybody

      i have trouble with the code below because i use solidworks intropt and i cant done the code correct too

      what should i do ?

       

       

      public void _cbCreatePMP()

              {

                  ppage = new UserPMPage((sldworks.sldworks ) iSwApp);                                         // i cant use sldworks reference

                  ppage.ActiveModel = (SolidWorks.Interop.sldworks.ModelDoc2 )iSwApp.ActiveDoc;

              }

       

      so i do this but it has logic problems :

       

      public void _cbCreatePMP()

              {

                  ppage = new UserPMPage((SwAddin ) iSwApp);

                  ppage.ActiveModel = (SolidWorks.Interop.sldworks.ModelDoc2 )iSwApp.ActiveDoc;

              }

       

      i do this too but it does not work

       

      public void _cbCreatePMP()

              {

                  ppage = new UserPMPage((SolidWorks.Interop.sldworks.sldworks ) iSwApp);

                  ppage.ActiveModel = (SolidWorks.Interop.sldworks.ModelDoc2 )iSwApp.ActiveDoc;

              }

       

      thanks a lot