We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2010-02-11 05:35 PM - last edited on 2023-05-24 12:38 PM by Rubia Torres
2010-02-12 04:44 PM
Peter wrote:This is similar to what they did with the S/E Markers in AC11 -- the scripts for all Markers are in a single macro. And the gs_general_door_macro came about in AC12.
The whole object is controlled by the gs_general_door_macro. The other scripts are empty! The only job it does is to specify which gs_doorcode to use.
2010-02-12 09:17 PM
gs_door_type = 0 if gs_doorcode = "D1 Entrance" then gs_door_type = 1 if gs_doorcode = "D1 Entrance Side1" then gs_door_type = 2 if gs_doorcode = "D1 Entrance Side2" then gs_door_type = 3 if gs_doorcode = "D1" then gs_door_type = 4 if gs_doorcode = "D1 Int Door" then gs_door_type = 5 if gs_doorcode = "D1 Transom" then gs_door_type = 6 if gs_doorcode = "D1 1Sidelight" then gs_door_type = 7 if gs_doorcode = "D1 1Sidelight Transom" then gs_door_type = 8 if gs_doorcode = "D1 2Sidelight" then gs_door_type = 9 if gs_doorcode = "D1 2Sidelight Transom" then gs_door_type = 10 if gs_doorcode = "D1 Double Acting" then gs_door_type = 11 if gs_doorcode = "D1 Int Asymmetric Door" then gs_door_type = 12 if gs_doorcode = "D2" then gs_door_type = 13 if gs_doorcode = "D2 Int Doubledoor" then gs_door_type = 14 if gs_doorcode = "D2 Transom" then gs_door_type = 15 if gs_doorcode = "D2 1Sidelight" then gs_door_type = 16 if gs_doorcode = "D2 1Sidelight Transom" then gs_door_type = 17 if gs_doorcode = "D2 2Sidelight" then gs_door_type = 18 if gs_doorcode = "D2 2Sidelight Transom" then gs_door_type = 19 if gs_doorcode = "D2 Double Acting" then gs_door_type = 20 if gs_doorcode = "D2 Double Egress" then gs_door_type = 21 if gs_doorcode = "D1 Segmented" then gs_door_type = 22 if gs_doorcode = "D1 Segmented Transom" then gs_door_type = 23 if gs_doorcode = "D2 Segmented" then gs_door_type = 24 if gs_doorcode = "D2 Segmented Transom" then gs_door_type = 25 if gs_doorcode = "D1 Bifold" then gs_door_type = 26 if gs_doorcode = "D2 Bifold" then gs_door_type = 27 if gs_doorcode = "D1 Garage 1" then gs_door_type = 28 if gs_doorcode = "D1 Garage 2" then gs_door_type = 29 if gs_doorcode = "D1 Garage 3" then gs_door_type = 30 if gs_doorcode = "D1 Garage 4" then gs_door_type = 31 if gs_doorcode = "D1 Segmented Garage 1" then gs_door_type = 32 if gs_doorcode = "D1 Segmented Garage 2" then gs_door_type = 33 if gs_doorcode = "D1 Segmented Garage 3" then gs_door_type = 34 if gs_doorcode = "D2 Sliding" then gs_door_type = 35 if gs_doorcode = "D3 Sliding 1" then gs_door_type = 36 if gs_doorcode = "D3 Sliding 2" then gs_door_type = 37 if gs_doorcode = "D4 Sliding" then gs_door_type = 38 if gs_doorcode = "D1 Pocket" then gs_door_type = 39 if gs_doorcode = "D2 Pocket" then gs_door_type = 40 if gs_doorcode = "D1 Sliding Ext" then gs_door_type = 41 if gs_doorcode = "D2 Sliding Ext" then gs_door_type = 42 if gs_doorcode = "D1 Commercial" then gs_door_type = 43 if gs_doorcode = "D2 Commercial" then gs_door_type = 44 if gs_doorcode = "D1 Combi Commercial" then gs_door_type = 45 if gs_doorcode = "D Empty" then gs_door_type = 46 if gs_doorcode = "D1 Metal" then gs_door_type = 47 if gs_doorcode = "D2 Metal" then gs_door_type = 48
2010-02-12 09:34 PM
gs_optype_m = 1*(gs_door_type=34)+10*(gs_door_type=32)+11*(gs_door_type=33)The gs_opttype_m parameter will either be 1, 10 or 11 because a gs_door_type can only be one of 32, 33 or 34 (type of garage door - see list in PS of last post). So, they are doing this decimal multiplication and complex formula simply to make 33 become 11, 32 become 10 and 34 become 1... An expensive (multiplication) and confusing (by a 1 line formula) way of mapping one set of integers to another.
IF gs_optype_m=1 THEN ... ENDIF IF gs_optype_m=10 OR gs_optype_m=11 THEN ... ENDIFWhich is the same as doing the first block for a door_type of 34 and the second for types 32 or 33. Is the mapping confusion necessary? Maybe if some other doors call this macro and the optype (operation type?) code is required for them as well. But, then document it for goodness sake. I should mention that no code - door type, optype - nothing - is ever documented with comment lines in these obscure macros.
2010-02-12 10:59 PM
Karl wrote:To be honest, I have never 'successfully' modified any of the doors or windows They are a little beyond my abilities! I can only say I have done a little probing to try to see how they work.
.....I'm impressed that people like Laura and Peter have even ventured to modify these things. Good for you two!🙂
2010-02-13 03:13 AM
Peter wrote:Quite an impressive diagram Peter. You are a very patient person to have tackled this. I started down that road awhile ago and ultimately decided that it was much easier and more effective to just write my own doors (windows to eventually).
As an exercise I analysed the one of the simplest windows in the library
2010-02-13 08:38 AM
2010-02-15 03:14 AM
2010-09-07 09:25 AM
Which is the same as doing the first block for a door_type of 34 and the second for types 32 or 33. Is the mapping confusion necessary?I think much of the confusing code is, that the macros are extended version by version for new functions, but they have to work with older d/w versions because of the migration libraries. I think this is a possible reason for doing remapping of indices. Sometimes its easier to to a remapping instead of crawling through the whole code.
And with scripts this complex am I crazy in thinking that GS have a much more advanced GDL editing system than they give us in Archicad?And additional multilingual! Much objects and macros exist in localised versions!
How do they keep track of all the parameters and macro calls and if, when,while, etc. routines?