question

jacopo-r avatar image
0 Likes"
jacopo-r asked Jason Lightfoot answered

Capture view with code

Hi,

I have attached a model where I am trying to capture the view using the viewtofile() function. Can anyone tell me why no file is being created in the file directory?

Thanks


CaptureView with code.fsm

FlexSim 24.0.1
captureview
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

That's not the active view - use this:

treenode view=views().find("active>Documents/Perspective/1+/~");
viewtofile(view, modeldir() + "screenshot.bmp");


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.