3D Design

3D Design

Topics related to Ansys Discovery and Ansys SpaceClaim.

Discovery API – saving project files

    • downie
      Subscriber

      Hello,

      I've developed an addin that has the following simple workflow.
       
      1. Open a Discovery model (.dsco file) using Document::Open(String)
      2. Resets the project (File::ResetProject), copies the solid bodies from the Document to the project, and then performs modeling operations on the model.
      3. Control returns to the Discovery
       
      At this point, the Disovery application has the new model displayed.
       
      My addin is still in memory and has a pointer to the Document from step #1, but when I try to save it (Document::SaveAs) it fails with an exception.
      If I save the Document before step #2, there isn't an exception and the model is saved.
       
      Therefore it appears that the call to File::ResetProject() is deleting the Document and it's contents.
       
      Is there a way to tell Discovery not to delete the Document when File::ResetProject is called, i.e. a "soft" reset?
       
      Thank you,
      Blair Downie
       
Viewing 0 reply threads
  • You must be logged in to reply to this topic.