Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

viewport_var->fit(); is giving a Memory Error 107

1 REPLY 1
SOLVED
Reply
Message 1 of 2
tperam
192 Views, 1 Reply

viewport_var->fit(); is giving a Memory Error 107

 
Using c++, following is giving a memory error 107.
 
Ptr<Viewport> ViewPort;
 ViewPort->fit();
 
Please respond.
 
Thurai
 
Tags (1)
Labels (1)
1 REPLY 1
Message 2 of 2
tperam
in reply to: tperam

 

the Following from one the API Samples for SketchLines Worked Okay.

////////////////////////////////

 // Fit to window
 Ptr<Viewport> viewPort = app->activeViewport();
 if(!viewPort)
  return false;
 Ptr<Camera> cam = viewPort->camera();
 if(!cam)
  return false;
 cam->isFitView(true);
 viewPort->camera(cam);

////////////////////////////////

 

Regards,

Thurai

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report