2021-04-07
04:36 PM
- last edited on
2021-09-14
09:17 AM
by
Noemi Balogh
2021-04-08 02:14 PM
Industrial Architect and Structural Design Engineer, developer of free addon for sync GDL param and properties
2021-04-08 04:01 PM
!!!------------------ SORT ---------------------
dim mat_inx[][]
name = "" : id = "" : _fillType = 0 : _fillPen = 0 : _fillBgPen = 0
n_material = 0
for index=0 to 1000
n = REQUEST ("Name_of_material", index, name)
if n then
n = REQUEST{2} ("Building_Material_info", index, "gs_bmat_id", id)
n = REQUEST{2} ("Building_Material_info", index, "gs_bmat_cutfill_properties", _fillType, _fillPen, _fillBgPen)
n_material = n_material + 1
mat_inx[n_material][1] = index
mat_inx[n_material][2] = name
mat_inx[n_material][3] = id
mat_inx[n_material][4] = _fillType
mat_inx[n_material][5] = _fillPen
mat_inx[n_material][6] = _fillBgPen
endif
next index
for n = 1 to n_material
for m = n to n_material
if mat_inx[sort_col] > mat_inx[sort_col] then
for k=1 to vardim2(mat_inx)
_temp = mat_inx
mat_inx = mat_inx
mat_inx = _temp
next k
endif
next m
next n
!!!------------------ SORT ---------------------
sort_col = 2 for sort by ID
Industrial Architect and Structural Design Engineer, developer of free addon for sync GDL param and properties