We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2021-08-17 08:27 AM - last edited on 2024-09-24 10:30 AM by Doreena Deng
2021-10-14 03:28 PM
In case you are looking for some more information, here is a presentation from Enzyme https://geospatialworldforum.org/speaker/presentions2019/Connecting-GIS-BIM-Workflow-Case-Studies-Eu...
If you browse to slide 19 or so onwards you get a good introduction to how they use GIS data and grashopper to create 3D site models.
2021-10-25 10:05 AM
With this approach the area has to be calculated by the script from the polygon coordinates. There is no existing GDL solution, the shoelace formula can be used if there are no curved edges.
Another approach could be making a label (if you don't need IES data or 3D geometry). Labels have access to slab data: http://gdl.graphisoft.com/reference-guide/column-beam-and-slab-parameters.
Properties can also be created using Property expressions without GDL.
2021-10-25 11:56 AM
Hi Peter! Thank you for your response.
I've set up the shoelace formula and it works fine. It feels as though it would be possible to calculate even with curved edges. The slab accessory seems to convert the arcs of the slab into a prism made up of straight polylines. I haven't really figured out where in the process this happens though.
If I look at the saved parameters, an accessory created from a rectangle slab has 15 parameters (x, y & status and the first point again with -1 as status). If I make one of the slab edges into an arc, the number of parameters reach around 150-300 instead (231 in my added screenshot). So, my thinking is that I could use those coordinates for the shoelace formula in some way to get a decently accurate result, would you say that's correct?
I haven't been able to "find" those coordinates in the Properties Script, only in the 3D. Is it possible to save them in the 3D script and let the properties script read them?
I also have not been able to control the appearance of the accessory when using an arc, neither RADIUS, TOLER nor RESOL seems to affect it. Do you know if this can be done?
Kind regards
Kaj
2021-10-27 10:37 AM
I looked into it and the add-on gives only straight edges to the slab object. It can't be controlled.
The polygon is a parameter, it should be available in the properties script. There is an example in the "Footing 1" object.
2021-11-02 04:39 PM - edited 2021-11-02 05:03 PM
Thank you Peter!
I looked into the Footing object and could figure out what to use in my object. It's not the most elegant, but it does the job.
The next step would be to figure out
1. How to do setbacks within the same object.
2. Connect a label that can show custom properties
Is that anything you could point me towards?
Kind regards
Kaj
2021-11-08 01:13 PM
Sorry, labels can't show properties from the properties script, those are only available for Lists (not Interactive Schedules). But you can access parameters from a label (use REQUEST "assoclp_parvalue") and do the calculations in the label.
Setbacks like solid operations? That sounds difficult, you'd have to intrepret the shape somehow to know what to do.
2021-11-09 09:11 AM
Thank you Peter!
Labels: Okay, I've started looking into the "assoclp_parvalue", but I'm a bit lost. Sorry if my questions are a bit basic, but so am I.
An example: In my object, I have a parameter called num_stories which is an integer dictating the number of stories. How would I write the REQUEST to use this parameter in the label?
Setbacks: Yes, either that, or perhaps a separate PRISM with editable hotspots (but preferably something a bit simpler).
Is it possible to somehow ask for another slab or polyline? Say that I want to have a 2 meter setback on my top story. Can I within my object create a button which, when clicked, prompts the user to select an additional slab/polyline, and from this shape subtract the 2 meter setback?
Kind regards
Kaj
2021-11-12 04:21 PM - edited 2021-11-12 04:24 PM
num_stories = 0 ! this will receive the value if found
n = REQUEST ("ASSOCLP_PARVALUE", "num_stories", _unused, type, flags, dim1, dim2, num_stories)
type, flags, dim1, dim2 are returned from the labeled object, you can double-check them to see whether it's the same parameter that you expect.
There is no polygon input method in GDL. You could draw a set of editable hotspots on the polygon to define a second polygon that can be edited vertex by vertex, and you might need some button on the UI to reset it to the current contour of the object.
2021-11-19 02:33 PM
Thanks! I got it to work with the more simple parameters!
However, I can't seem to get it to work with the array of coordinates that is my starting polygon. How would I request that array?
Another question that popped up; can I in the user interface have a text box for typing in something that goes straight to an array parameter? So, array[1] has it's own box, as does array[2] and so on.
Kind regards
Kaj
2021-11-22 11:49 AM - edited 2021-11-22 11:49 AM
The request always returns a one-dimensional array:
p_values:
for ASSOCLP_PARVALUE returns the parameter value or array of values. The array elements are returned successively, row by row as a one dimensional array, independently of the dimensions of the variable specified to store it. If the variable is not a dynamic array, there are as many elements stored as there is room for (for a simple variable only one, the first element). If values is a two dimensional dynamic array, all elements are stored in the first row.You need to convert the one-dimensional array to two-dimensional (or use it as such, calculating indices).
Most UI_...{2} commands can show individual array elements. The reference guide always states where they can be used.