Problem with SaveAsImage

 

hello

i have a problem to call the SaveAsImage method.

    if (FAILED(app.GetActiveObject(_T("SolidEdge.Application")))) {

        exit(0);

    }

    DraftDocumentPtr sDoc = app->GetActiveDocument();

    WindowPtr win=sDoc->GetWindows()->Item(1);

    ViewPtr view=win->GetView();  // Here it crashed

It seems that the WindowPtr win is NULL. Do you know how to call it correctly ? Or is there a other way to call the SaveAsImage method of the ViewPtr ?

Solid Edge V19. (v19.00.09.03) and Visual C++ 2005

With nice greetings

 

Posted by: Heinz Rath
Post date: 10/17/2007 11:11:16 AM

1 REPLY

RE: Problem with SaveAsImage

Ah, this one is easy . I've ran into this before.

 

Draft Windows are different from all other environments in Solid Edge. You'll need to use a SheetWindowPtr.

 

Let me know how it goes.

 

Posted by: Jason Newell
Post date: 10/17/2007 11:14:06 AM