object sizes A and B and options
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-05-15 01:25 PM
‎2018-05-15
01:25 PM
Sometimes i do objects by coding but some objects are just easier to draw w fills and then 'save selection as object.'
Currently I am doing it for 1 object with many variants of it (w different sizes or shapes)
My questions are the following :
FIRST
Because am combining in one object many versions the sizes of A and B are always of the first option even if the second option has different sizes.
I went around this by inserting the code in the 'Parameter' tab:
IF optx='135x220' THEN
PARAMETERS A=0.220, B=0.135
ENDIF
IF optx='135x240' THEN
PARAMETERS A=0.240, B=0.135
ENDIF
But i have to do this for every single option. Is there a code i can use for archicad to take A and B automatically from the limts of the object?
SECOND
I plan on using this object in different projects (saving it in a container file) and keep adding versions with (with on off buttons or values) of it as time go on (updating the container file everytime) . Do you see any problem with this method? will my previous placed objects be fine or will they change?
I hope the text is clear.
Thanks in advance
Luis
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-05-15 04:27 PM
‎2018-05-15
04:27 PM
Luis
You need to split the 135x220 in to useable parameters. The easiest way to see this is to
look at the scripting (master script) of the DET_Stud object in the standard library. It is
a little tricky to figure out at first, but it will get you what you are after.
David
You need to split the 135x220 in to useable parameters. The easiest way to see this is to
look at the scripting (master script) of the DET_Stud object in the standard library. It is
a little tricky to figure out at first, but it will get you what you are after.
David
AC 19-26 Windows 10 64 bit, Dell Prercision 7820, Xeon Silver 2414R ( 12 Cores), 64 GB Ram, Quadro RTX 4000 8GB

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-05-16 07:58 AM
‎2018-05-16
07:58 AM
Dave wrote:Which library is this in? I cannot find it in the AC21 AUS default library.
the scripting (master script) of the DET_Stud object in the standard library.
Ling.
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-05-16 08:45 AM
‎2018-05-16
08:45 AM
You will want to do something like this in the master or parameter script.
i.e.
A = width/1000
PARAMETERS A = A
Barry.
n=SPLIT(optx, "%nx%n", width, string, height) A = width/1000 B = height/1000 PARAMETERS A = A PARAMETERS B = BIt is best to set the value of your parameter as well as set the actual parameter.
i.e.
A = width/1000
PARAMETERS A = A
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-05-16 08:52 AM
‎2018-05-16
08:52 AM
Luiscardoso wrote:It depends on what you are changing as it can affect already placed objects if you change the way the existing scripts work.
I plan on using this object in different projects (saving it in a container file) and keep adding versions with (with on off buttons or values) of it as time go on (updating the container file every time) . Do you see any problem with this method? will my previous placed objects be fine or will they change?
But if you are just adding new features and keeping the existing ones as they are, generally you should be fine.
Just make sure you 'Save' replacing the original object and do not 'Save As' with the same name as this will create a new object with a new GUID.
Existing objects will not be updated if you 'Save As'.
You may find if you are always updating the object that a container file can be a bit of a pain to extract and create all of the time.
The objects do not need to be in an LCF.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-05-16 08:53 AM
‎2018-05-16
08:53 AM
Found thread which seems to talk about the same thing. Breaking a string into parts to use as dimensions.
Ling.
ps. Woo! 50 line reduction!
Ling.
ps. Woo! 50 line reduction!
AC22-28 AUS 3110 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win11 | R5 2600 | 16GB | GTX1660 |
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2018-05-17 09:52 AM
‎2018-05-17
09:52 AM
thanks a lot for all the answers guys.
Luis
Luis