2024-10-31 03:34 AM - edited 2024-10-31 03:39 AM
Solved! Go to Solution.
2024-10-31 08:03 AM
I think the object does not get the area information of the slab, but You can calculate the area from the point information.
https://www.wikihow.com/Calculate-the-Area-of-a-Polygon this site tells how.
2024-10-31 08:03 AM
I think the object does not get the area information of the slab, but You can calculate the area from the point information.
https://www.wikihow.com/Calculate-the-Area-of-a-Polygon this site tells how.
2024-10-31 08:32 AM
@Pertti Paasky wrote:
I think the object does not get the area information of the slab
This is correct.
SLAB_TOP_SURF is not for use in REQUEST commands.
It is a Global Variable that can be used only in lists or labels - i.e. a label can give you the area of a slab.
As Pertti suggests, you will have to calculate the area from the point information (nodes) of the slab.
I am not quite sure why you would want the area for an accessory object though?
Barry.
2024-11-01 02:33 AM
Thank you very much! This is exactly what I want.
!!!===求板面积,不包括挖洞的=======
data1 = 0.0
data2 = 0.0
FOR i = 1 to points -1 !!!叉乘
data1 = P[i][1] * P[i+1][2] + data1
data2 = P[i+1][1]* P[i][2] + data2
next i
slab_area = (data1 - data2 ) /2 !!!单层面积
2024-11-01 02:42 AM
I want to create a GDL that generates a building model from slab Accessories Add Ons and calculates the area of the building.
When changing the shape of the slab, the building outline also changes, and the area data changes accordingly. The area data is embedded in this GDL, rather than displayed through labels.
2024-11-01 02:43 AM - edited 2024-11-01 02:45 AM
Thank you very much! This is exactly what I want.
!!!===求板面积,不包括挖洞的=======
data1 = 0.0
data2 = 0.0
FOR i = 1 to points -1 !!!叉乘
data1 = P[i][1] * P[i+1][2] + data1
data2 = P[i+1][1]* P[i][2] + data2
next i
slab_area = (data1 - data2 ) /2 !!!单层面积
With the calculation method, writing scripts using GDL is so simple.