ScriptSpot

Forum topic · Scripts Wanted

Return overall scene dimensions

By mogamma · 2021-05-11

Description

Hi All,

I'm looking for a script which can return the overall dimensions of a scene.

In this case we want to apply it to our tree library of over 1000 trees. It can be tricky to gauge by eye how large a tree is. Obviously theres room to scale to a degree but only so far. An accurate starting point would be helpful.

I was hoping to be able to batch run this script and get an excel doc/csv reporting the file names and the overall dimensions (in this scenario Z scale or height is most important).

We'd then use that sheet to apply keywords for filtering trees by height in our library.

I saw someone have a go at this a few years back but didnt seem to get it resolved.
Any ideas??
Thanks!

Comments (3)

.

jahman · 2021-05-23


objects.max - objects.min

Re object/scene total height

mogamma · 2021-06-08

Hi Jahman,

Sorry only just seen this reply.
I know nothing about scripting.
I use Project Manager which apparently can allow me to batch run scripts on a load of nested files/folders.

So do you know how I could wrap up a script which would measure the total scene height and then put it into a csv/spreadhseet next to the file name?

So I end up with a sheet of my 1000+ trees with their heights in the next cell?

Thanks!

.

jahman · 2021-06-08


(dotNetClass "system.io.file").AppendAllText @"C:\temp.csv" ((pathConfig.appendPath maxFilePath maxFileName) + "," + ((objects.max - objects.min).z as string + "\n"))

run this snippet for each scene file