We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2024-02-20 10:15 PM - last edited on 2024-09-26 01:54 PM by Doreena Deng
I've decided to try my hand at creating some GDL scripts to create items. But before I can start I need to know more about what is happening in the main AC software. Let's assume I have just opened a new project. Based on my usage the software automatically runs the last item used by the parts selector through the GDL interpreter such that the last object used is the default. That is, if you click on wall the item placed will be the wall last used in the last session. At this point in time I would think that the software is in a "wait" loop waiting for the user to make a selection. When the user, next, selects an item with a single or double click the software either goes to the part placement subroutine or to the specifications window for the item. My current thought is that inputs of nodes (start, finish, others) is not part of the GDL script. If that is true then the script is not responsible for setting those nodes? Where I don't have knowledge on is how does one create and call the specifications window for the part? Is that part of the script. As for the changeable specifications, would I be correct in saying that when the specification window is closed the main software re-interprets the GDL file of the part? I've been going through a lot of videos on GDL, especially one person, but some of what he does/shows is lacking in the explanation so it is hard to follow. I am hoping a little insight from other developers can make my quest simpler. Thanks and regards.
2024-02-21 12:31 AM
Hi,
I'm not sure I fully understand your question - or what you are attempting to understand, but this article in the GDL reference guide may assist:
https://gdl.graphisoft.com/gdl-basics/parameter-logic
When you first place an object, in simplest terms, the Parameter Script, Master script and then then 2D or 3D script are run (depending on the which view you are in).
When you are in the Object Settings, even before you place and object, again the Parameter Script, Master script and then then 2D or 3D script are run.
Anytime you change a parameter the same order of scripts are run.
An import note however is, the Parameter Script is only run when you change a parameter, even from the object settings, or adjusting a hotspot, just rebuilding the 2D or 3D views, will not trigger the Parameter Script.
You will also notice it you have print statements in your script, that all these scripts will execute a couple of times, whenever the objects are placed, parameters changes, or views rebuilt. So sometimes you need to use GLOB_MOD_PAR to check which parameters where changes, to force other paramters to update accordingly, or use:
n =APPLICATION_QUERY
("parameter_script"
, "firstoccasion_in_progress", isFirstRun)
to isolate only the first time the parameter script is run after a parameter change.
Hope that helps.
Thanks,
Scott
2024-02-21 02:14 AM
Don't confuse GDL 'objects' with other 'elements' such as walls, slab, beams.
Walls, beams, roofs, etc., are not controlled by GDL.
GDL is only used for 'objects'.
Everything is an 'element' (even lines and text), 'objects' are a specific type of 'element'.
Doors, windows, skylights, openings, stairs, railing and curtain walls as well as labels and markers, are all specific types of 'objects' and are controlled by GDL.
With any tool (wall, slab, object, railing, etc.) you use, Archicad will just remember the settings you last used.
When you change the tool settings before you place an element, those settings will be the default the next time you use that tool.
If you select an element and change the settings, this will not affect the default settings for that tool.
You can ALT+click (pipette) on any element to gather its default settings and this will change the default settings of the tool to match those settings.
Barry.
2024-02-21 09:09 PM
Thanks guys. The information is enough for now but it has got me thinking. If walls, slabs, etc. are not GDL objects, per se, is there any reason why a "wall" chosen using the "objects" tool can't be created. My goal is to create a script that allows me to have many options. As an example, it would be nice to be able to select a "wall" where I can set all of the various layers and specifications (like real bricks, insulation, drywall and such) with basic dimensions. In other words I could specify a brick veneer (with brick size, colour, pattern, etc.) followed by an insulation type (and its features, from the outside to the inside. Those are the kinds of options I would like to see when using the "wall" tool where the model has a true representation of it. The idea that it allows a BOM with all of the components (and how many of each) to be created. It's the kind of thing that reduces the need to have someone manually determine how many of the various components are needed to build, in this case, a wall. I realize this would eliminate the need for a "wall Tool" but there shouldn't be a problem for the AC programmers to modify the tool to allow users to input the necessary data. Unfortunately I don't see a change happening with how the wall tool works anytime soon. I figure that it could be quicker to create a GDL wall with all of the features desired for parameter selections and smart enough to actually determine how many of a specific component (say brick or stud) are needed. So i'm off to create a flowchart and hit the books and videos regarding GDL.
Again, Thanks and regards.
2024-02-21 09:50 PM - edited 2024-02-21 09:51 PM
I think you would have to create your own add-on to have full features with the archicad environment through a GDL object.
I remember cadimage tools doing something close to what you are searching. (wall cladding)
I couldn't find a relevant official link so i will just share a youtube clip.
2024-02-22 02:36 AM
You could create a 'wall' object, but it would be an object, not a wall - no doors or windows.
You could make that object work with the 'wall accessories' add-on, so it will take on the openings, but you would still need a base wall that has the openings in it.
What is wrong with a composite or complex profile wall?
They contain all the individual skins you need as well as the quantities for them.
And in the case of complex profiles, you can add modifiers to control the heights and widths of those skins for each placed element.
Barry.
2024-02-23 08:16 PM
Hello Barry:
I think you missed the point. Skins are only pictures and even though it is possible to modify the sizing of the skin it is still just a stupid picture without any intelligence about what it represents. Good for pictures but not for actual information. The whole idea of BIM is that the model is intelligent and represents all of the components of a building. Let's take my wall example. My design requires a brick clad outside wall. Currently I can create a simple wall and change the outside surface to a brick pattern or basically use a composite wall which will give me layers but they are true representations of all of the wall's components. The purpose of BIM as I understand it is to create buildings and that the model provides all of the information about the components needed to build it. The current "Wall" tool allows the user to create walls but they lack information. In my brick clad wall AC does not have any info regarding the number of bricks or their size which is needed so the builder can buy the right number of bricks of the correct size. Today it would require that a person manually calculate the number of bricks and amount of mortar needed to build it. The same thing applies to steel reinforced walls. Instead of the wall generating the components and amounts needed the task falls to another person which means extra time and costs to the builder. The issue to me, today, is that it's a pain in the butt to have to do all of the extra work calculating amounts and types. From the small amount of GDL learning I've done and creating software it should be possible to create a GDL "wall" object with enough capabilities to do all the things I would like and allow the placement of doors, windows and such. It obviously won't be easy and the script will be extensive but it should be doable. Personally I would rather see all of these features and capabilities inside the "wall" tool which would be better than a bunch of GDL objects of very large scripts. As I said, I would rather that AC generates the number of bricks in my wall instead of me having to calculate the number by hand. Please note that I only design for myself and as such I do have a fair amount of free time which I can create my GDL wall in.
In closing, a BIM model is not about creating a pretty model with "skinned" surfaces, it should be representative of all of the actual materials that make up the building right down to the nuts and bolts.
Thanks for all of your previous assistance as it is appreciated.
2024-02-26 04:21 AM - edited 2024-02-26 04:21 AM
@wile e coyote genius wrote:
The current "Wall" tool allows the user to create walls but they lack information. In my brick clad wall AC does not have any info regarding the number of bricks or their size which is needed so the builder can buy the right number of bricks of the correct size. Today it would require that a person manually calculate the number of bricks and amount of mortar needed to build it.
Sounds like you need to explore Properties with Expressions.
Your wall can have a 'Classification'.
'Properties' can be associated to the classification.
These properties can have 'Expressions' which can be used to calculate the number of bricks per m² of a particular wall skin.
See some examples here.
An expression for number of bricks would imply be area divided by 1m² (to bring the area back to a number and then multiply by the number of bricks.
The expressions can get very complicate if you want them to.
A very simple expression would be ...
Barry.