question

Kari Payton avatar image
0 Likes"
Kari Payton asked Phil BoBo edited

Save object from a model where the source for the object is deleted.

Is there any way to save an object from a model where the source for the 3d file has been deleted?

FlexSim 17.2.2
3d shape
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

Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo edited

The applicationcommand “byteblocktofile” will export binary data from a node to a file. You can use this to export the packed media nodes to files.

Here is an example that exports all the packed media in a model to files:

  1. for (int r = 1; r <= content(packedmedia(model())); r++) {
  2. treenode folder = rank(packedmedia(model()), r);
  3. for (int i = 1; i <= content(folder); i++) {
  4. treenode file = rank(folder, i);
  5. applicationcommand("byteblocktofile", file, concat(modeldir(), getname(file)));
  6. }
  7. }
· 4
5 |100000

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