# Exporting structure for multiple static simulations from dynamic GroIMP model

**URL:** <https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361>\
**Category:** GroIMP\
**Created:** [April 1, 2025, 3:04pm UTC](https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361 "2025-04-01T15:04:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![michele.butturini](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@michele.butturini](https://fspm.discourse.group/u/michele.butturini)\
**Post date:** [April 1, 2025, 3:04pm UTC](https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361/1 "2025-04-01T15:04:27Z")

</div>

Hi everyone,

I’m working with a dynamic crop model in GroIMP.

At a certain time point during growth, I’d like to _pause the simulation_ and run a large number (a few thousand) of _static simulations_ based on that plant structure—testing variations like different leaf shapes, angles, etc.

Since I’ll be running many of these, I cannot afford to run the dynamic model from scratch every time.  
Is there a way to _export the structure_ at that specific time point and then reload it independently for static simulations?

Any suggestions on how to best approach this would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![michele.butturini](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@michele.butturini](https://fspm.discourse.group/u/michele.butturini)\
**Post date:** [April 1, 2025, 3:21pm UTC](https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361/2 "2025-04-01T15:21:52Z")

</div>

I understood that importing as XEG could be an option - but how can i do that?

---

<div class="post-metadata">

**Author:** ![michele.butturini](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@michele.butturini](https://fspm.discourse.group/u/michele.butturini)\
**Post date:** [April 1, 2025, 3:29pm UTC](https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361/3 "2025-04-01T15:29:26Z")

</div>

I managed to install the plugin ExchangeGraph with the plugin manager, however I cannot see/understand how to export the .xeg in practice - I cannot find any button

---

<div class="post-metadata">

**Author:** ![gaetanH](https://avatars.discourse-cdn.com/v4/letter/g/edb3f5/32.png) [@gaetanH](https://fspm.discourse.group/u/gaetanH)\
**Post date:** [April 2, 2025, 8:29am UTC](https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361/4 "2025-04-02T08:29:58Z")

</div>

Hi Michele,

You can export your graph in XEG the same way as you export the scene:

- From the GUI: 3d view \> view \> export … \> export complete scene (or sub graph) \> . In the windows to select the file and type there should be a .xeg option.
- From the rgg code with:

```auto
public void run ()
{
	export3DScene(getWD()+"test.xeg", "xeg");
}

```

If the .xeg format is not available it is probably because the plugin is wrongly installed (or the version is incompatible?). With the latest groimp and exchange graph version I could run the small example above for both export and import without issue.

To automatize a bit the setting up of your scene with the exported graph you could use load the graph and adds it to your scene from the code with:

```auto
protected void init ()
[
{ Node n = loadNodeFromFile(getWD()+"test.xeg", "model/vnd.xeg"); }
	Axiom ==> n;
]

```

Now, to save and reuse sub part of your project graph in a proper pipeline, I would not use .xeg. SecGraph from the Graph Explorer plugin sound more adapted. Tim should be writing some documentation on it soon. He will update when it’s ready.

---

<div class="post-metadata">

**Author:** ![tim](https://avatars.discourse-cdn.com/v4/letter/t/ce73a5/32.png) [@tim](https://fspm.discourse.group/u/tim)\
**Post date:** [April 2, 2025, 9:20am UTC](https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361/5 "2025-04-02T09:20:34Z")

</div>

Hi,  
if I understand you correctly you might want to have a look at the Secondary Graphs (I presented them in Wageningen). There is an embedded example that I think is quite similar to your Problem, you can find it in Project explorer (File/Example Projects) under Graph Explorer / SecGraphSaveAndLoadExample

---

<div class="post-metadata">

**Author:** ![michele.butturini](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@michele.butturini](https://fspm.discourse.group/u/michele.butturini)\
**Post date:** [April 4, 2025, 1:48pm UTC](https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361/6 "2025-04-04T13:48:43Z")

</div>

> [@gaetanH](#):
>
> ur project graph in a

Ok thank you I am following that tutorial, however in my graph for some reason i don’t know I have 3 rggroot. how can I correct that?

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/fspm/original/1X/f8eec3ea531b2309c9130dc3cab243d2aae96f44.png)

also, when I upload a saved graph it doesn’t dynamically grow anymore

---

<div class="post-metadata">

**Author:** ![michele.butturini](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@michele.butturini](https://fspm.discourse.group/u/michele.butturini)\
**Post date:** [April 4, 2025, 2:11pm UTC](https://fspm.discourse.group/t/exporting-structure-for-multiple-static-simulations-from-dynamic-groimp-model/361/7 "2025-04-04T14:11:31Z")

</div>

This is also true in the example: if you save and then load and then run within the same session then the growth rule will be applied to the A. However if you reset and load the saved graph, then the rules don’t work anymore on module A .
