1 Reply Latest reply on Sep 19, 2011 1:32 PM by Maynard Viersen

    Save selected sheets as eDrawing.

    Maynard Viersen

      i 'm trying to figure out how to save a drawing as an e-drawing, but only publishing selected sheets.


      i know that i need to use swEdrawingSaveAsOption_e.swEdrawingSaveSelected.


      Then i need to set swUserPreferenceStringListValue_e.swEmodelSelectionList.


      And I set the list with ISldWorks::SetUserPreferenceStringListValue.


      so this is what I end up with.


      swapp.SetUserPreferenceIntegerValue((int) swUserPreferenceIntegerValue_e.swEdrawingsSaveAsSelectionOption,

                      (int) swEdrawingSaveAsOption_e.swEdrawingSaveSelected);

      swapp.SetUserPreferenceStringListValue((int)swUserPreferenceStringListValue_e.swEmodelSelectionList, ListValue);


      So, I want to publish sheet A, B, and C.


      How do I set "ListValue"  is it a string with the value of "A, B, C" or and array or is it some other format?

        • Re: Save selected sheets as eDrawing.
          Maynard Viersen

          ok, so I looked everywhere for the answer, and it actually was in there, but was under the swDxfMappingFiles section.


          "separate each string in the list by a line feed  (e.g., the vbLf constant in Visual Basic)"


          so if i want to publish sheets A, B, and C, I would do the following.




                      string SelectionList = "A\nB\nC";

                      swapp.SetUserPreferenceStringListValue((int)swUserPreferenceStringListValue_e.swEmodelSelectionList,                SelectionList);


          Sometimes just formulating the question gives you the answer.