Is there any way to save an object from a model where the source for the 3d file has been deleted?
Is there any way to save an object from a model where the source for the 3d file has been deleted?
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:
for (int r = 1; r <= content(packedmedia(model())); r++) { treenode folder = rank(packedmedia(model()), r); for (int i = 1; i <= content(folder); i++) { treenode file = rank(folder, i); applicationcommand("byteblocktofile", file, concat(modeldir(), getname(file))); } }
do I need to tell it where to save or it saves in same folder as the model file?
That script is using modeldir() as the destination to put the files.
Ok. I ran the script but didn't get any output files.
6 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved