We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2021-12-08 05:35 AM
Hi all,
I was wonder how you would go about scripting an object substitution. Given a parameter in Object A, I want to replace it with Object B. I tried adding a CALL for Object B and script skip to the start of each of the scripts within Object A but that does not seem to have worked...
As a last resort I figured I could always extract the entire Object A into a new object with Object A would then call though I would rather not add more objects. IF X = Y then CALL "Object A" else CALL "Object B"
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2021-12-15 09:39 AM
What I have found out, that CALL function must be in the form CALL ... PARAMETERS ... to work properly. It can be CALL ... PARAMETERS ALL or listed specific parameters, needed for this macro call. You can use CALL without PARAMETERS extension mostly when you call a text file with GDL extension rather then GSM file. Also you can specify a file name for your call as a string and after use it in CALL function: IF X=Y THEN s='Object A' ELSE s='Object B' : CALL s PARAMETERS ALL.
2021-12-15 10:48 AM
I am not sure what I did, but a few days after this query, the object substitution was working...
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |