question

Ale avatar image
0 Likes"
Ale asked Jacob Gillespie edited

Floor Utilization

Hi @Kari Payton,

For the floor utilization can you please provide an example how you implemented the floor Utilization. script? Do you add it in a custom code? do I need to create a process flow for it?

Thanks!

Choose One
floor utilization
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

Jacob Gillespie avatar image
3 Likes"
Jacob Gillespie answered Jacob Gillespie edited

You can just copy the script into the Script Window.

Open the script window by pressing the button in the toolbar.

Then paste the script and click the green Execute button. The return value is displayed in the results field at the top of the script window.


scriptconsole.png (1.1 KiB)
script.png (10.7 KiB)
· 2
5 |100000

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

Ale avatar image Ale commented ·

@Jacob Gillespie thanks for the response. Why am I getting an exception?

1 Like 1 ·
7ewcm.png (5.8 KiB)
ejdlj.png (15.1 KiB)
Jacob Gillespie avatar image Jacob Gillespie ♦ Ale commented ·

@Ale

My script isn't a very robust one. You seem to have a non Object node in your model tree.

If you just want to skip anything that isn't an object use this script:

double area = 0;
var objects = model().subnodes;
for(int i = 3; i <= objects.length; i++) {
	if(objects[i].is(Object)) {
		Object obj = objects[i];
		area += obj.size.x * obj.size.y;
	}
}
return area;
1 Like 1 ·