A Streamlined approach to bulk exporting (and viewing) is currently being tested, please sned me a message if you are about to follow this tutorial but would prefer to test the new method
The answer to this question is yes, but its a bit fiddly. This guide will take you through the process step-by-step.
If you’re already comfortable with plot commands etc. and just want the script building excel sheet scroll down!
Before following this guide, you must first create some plots in FLAC showing the results that you need, I haven’t gone into detail about plotting here but you can see the forum post on basic plotting from @Abou here: https://forum.cavroc.com/d/99-what-are-the-basics-for-plotting-in-flac3d
Stage 1: Setting up the Plots
First of all, we must manually make some plots showing anything that you want to look at for each of the steps.
For this example I have made two plot windows to show volumetric strain and closure strain:
At the moment, these plots are titled ‘Plot01’ and Plot02’
Next we want to export our plots as data files. Doing this means that the plots are ever closed, or we want to access them in a different project window we can recreate them automatically.
To do this right click on each of the plots, then go to [export>>Data file]
Name the file something sensible, it is often useful to start any plot data file names with ‘PLOT_’ it makes them easier to find in large project folders. This is my closure strain plot so I have named the file ‘PLOT_Closure Strain Iso Sufaces.dat’
The data file has no attachment to the model step, it just includes the instructions needed to make the plot again, so it can be used for any saved state. Therefore you do not need the step number in the data file name.
Once you have exported data files for each of your plots, you will see them showing up in tabs beneath the plot window.
Next we need to make sure when the instructions are used by FLAC to build the plots, they have an appropriate title. To do this we need to add a command to the data files.
Do this for each of the plot data files, saving them as you go
Stage 2: Writing a script to export your images
In simple terms we need to write a script carry out the following tasks:
- Create the plots windows that need to be exported as images,
- For Each of the steps in the model
- Load the results file into FLAC
- Export each of the plots as an image file
- Once complete, we want to close the plots.
Thankfully, as we do this type of exporting very often, we’ve got a handy Excel sheet to write these commands for you.
Download the excel sheet here and open it up in excel.
https://drive.google.com/drive/folders/1pdv9axwLqg0-7zIRB-hZN2VMEhIdn0Rk?usp=sharing
In Column A, you must add the file names for all of the data plot files you’ve created.
In column B you must add the corresponding plot titles that we have added to the data files, for this example I just have the two data files, and two plot titles
Next we need to input a few ‘settings’
- The total number of steps in the model is the total number of steps you wish to plot
- ‘Export every x steps’ allows you to set a number of steps to skip between each image export ie. To export an image every 5 steps, set the value to 5, for every step, set it to 1.
- Image size allows to specify a resolution for the image 1920 1080 is standard ‘HD’ resolution, but you can set this higher or lower if needed.
- The project name should match the StopeX project name
- Finally the number of plot files is a count of the plot files you have created.
The input settings for this example are:
On the right of the spreadsheet, the commands have been automatically created.
In FLAC3D, create a new data file
Give the file a sensible name such as ‘Plot Export Commands’
Then copy column H from the spreadsheet into the new data file, followed by column L, followed by Column N.
Finally click Run on the Plot export commands data file, and wait for your images to appear in the project folder.