2009-12-23 04:24 PM - last edited on 2023-05-24 12:39 PM by Rubia Torres
2009-12-23 05:23 PM
Cleverbeans wrote:You can read about script types in section 'Script type specific issues' of GDL Technical Standards:
1) Why are the scripting categories such as the Master, 2D, 3D, etc. separated? I know the master script is interpreted first allowing locally global variables to be defined, however I'm uncertain as to how and when the other scripts are run. Are they triggered by events in the model or are they all run in a specific order?
Cleverbeans wrote:Unfortunately, you can't attach two independent objects in an intelligent way in ArchiCAD (other than wall openings and walls). You can align them while placing the second one using
2) How do I force an object to align with another object on placement? Windows and doors for example resist being placed in an empty part of the model - how do I get other objects to behave in a similar fashion for arbitrary objects?
Cleverbeans wrote:No, not yet. As GDL is based on programming language Basic, it doesn't have classes or structures. I has arrays, of course, which can serve as a grouping of values but they shouldn't be used to store heterogenous data.
3) Is their any meaningful way to collect variables into a container of some kind and refer to them collectively? So rather than having three variables for the x,y, and z coordinates can I have a single variable containing an array with three values attached and access them separately?
Cleverbeans wrote:Macros were created to extend the capabilities of GDL. So yes, they are the generic functions, but in a programming language analogy they could be classes in my opinion (since they have data and multiple scripts). Local functions can be implemented as named subroutines. These can be called only in the script defining them (with the exception of subroutines defined in the master script). Subroutines don't have formal parameters or return values but they can read and write all variables in the script 'globally'.
4) Is their any means of creating custom functions or is that behavior entirely handled through macros?
2009-12-23 06:09 PM