2 Replies Latest reply on Nov 21, 2013 8:29 AM by Paal Eilertsen

    Creating av drawing with a certain configuration problem

    Paal Eilertsen



      I have some code that is supposed to create a drawing from a template with a view of an assembly in a given configuration.


      Dim drawingdoc As SldWorks.DrawingDoc


      drawingdoc = gSWApp.NewDocument(cOperasjonsmalDocNameNor, swConst.swDwgPaperSizes_e.swDwgPaperA4size, 0, 0)


      // I have looked into the API and ChangeRefConfigurationOfFlatPatternView seems to be the way to go, but I cannot get it to stick when I save.


      drawingdoc.CreateDrawViewFromModelView3(gMainAssembly.GetPathName, "fcp", 0.08, 0.16, 0)

      drawingdoc.ChangeRefConfigurationOfFlatPatternView(gMainAssembly.GetPathName(), "guide_view")



      drawingdoc.SaveAs2(drawingFileToSave, 0, False, True)



      Anyone that know the solution here?


      Best regards

      Pål Eilertsen