ArchiFrame video
ArchiFrame February User Webinar: Customizing ID Numbering for Planks & Boards in ArchiFrame
Transcript source: TimeAI transcription · Reviewed and approved for this publication
Show transcript
YouTube's own caption track may differ from this reviewed transcript.
OK, welcome everyone.
Welcome to the first ArchiFrame webinar of 2025.
Today it's going to be quite a meaty technical topic.
So we have Petteri here that will be presenting.
No really further notes from me.
I think we're happy to just dive in.
As usual, this will be recorded and there will be a space for questions.
So when you have a question, I think I bet that he's happy to be interrupted.
So you can just unmute yourself and ask a question.
But there'll also be space for that at the end.
And, and feel free to share as much, as little as you want when you're asking those questions.
Just please do be sort of aware that it will be recorded and then will be added to YouTube.
And apologies for anyone with any confusions with the time zones.
And that was my mistake.
And we will also be coming online 2 hours from now just in case if any, anyone got the wrong time.
So yeah, without further ado, I'll pass it on to Petteri.
And please feel free to use both the Q&A and the chat function.
If you want to ask questions that way, please do and then I can read them out for bet three.
OK, great.
Thank you, Kayleigh
So today's topic is going to be IDs of the elements.
And I went through the topic and the the the invitation, we were speaking about board and plank IDs.
But today I have prepared only, only the plank IDs.
But for the boards we have something similar.
But let's see, you can always ask if you're interested at the board from the boards.
We can get back to that at the end of the webinar.
So I will share my screen and I hope you are seeing it now.
Yes, I can see it.
OK, good.
And like Kayleigh said, if you have anything to ask you can just interrupt me.
We are, we are not so many, we are now.
We are 12 all together.
I think so.
The ID is and this we have ID assigned button in two places here with the plank tools and in the element tools and at least this one at the element tools works for the walls and.
Thanks Marius for bringing this to our knowledge.
I'll show how how to assign IDs to the walls.
So one thing also, it was so cool.
I haven't used this before.
How to add labels to the walls walls to see their current IDs is here are the document menu annotations and label selected elements.
And yeah, it looks like I've already given these IDs, but I'll do it again using different ways.
So for the walls and not frame elements, please use this element to give IDs button and here you give the starting ID and select.
If you want to have any script run for this element tool, please don't select this one.
This is really meant only only for the planks.
If you are giving IDs to the planks then we have built in rules.
Let's try this Y coordinate first.
So the lowest should get lowest number and then if it's same Y then the X coordinate will be taking into account.
So this this is the lowest and this is then the second lowest of the same row actually with these three.
And here we have 45, 67 and so on.
And then this clockwise, counterclockwise system is pretty nice.
And to select the starting the element that gets the first ID, it is the one you select the last.
So I have suspend groups on and I deselect this wall and select it again to get it to say that that is the one I want to start the numbering and let's say clockwise.
And for some reason, the natural way I think at least for me is to go counterclockwise.
And how to do that is to reverse the order here.
So now, now we've got 12345 here we have 6-7 and so on.
And then you could, this is yes, even before you have created ArchiFrame elements, if you assign walls if they are not already set by whoever did the archive model or in case you did it yourself, then this it's good to give ideas to the walls before converting into ArchiFrame elements because then there is a chance that the work is done.
The ideas are given already when you generate the elements at the first place like like we have here.
And then let's see the current current IDs using this counterclockwise.
So we have the the normal stuff element ID and then ID inside the element and how to get these IDs well visible using this red colour is from the object settings all parameters and here under the view settings there is ID material 3D which I have selected to be read.
The default value is this general, meaning that it will use the same material as the plank, and if it's white on a white, they're not very well visible.
And then the first, a custom numbering style I know someone of you are using already is that you assign IDs to the blanks manually.
And then what you will achieve with that is that even in different elements, if you have a similar plank, you will get the same ID and those will be grouped together for your CNC or for your excel list of the timber needed.
And to switch to manual mode I you need to select or set the setting from the ArchiFrame element level.
So what I did, I selected all the elements here to the 3D window and then I will open more settings.
But actually yes.
Do you have any, any, please
Ask now if you had any questions from the topics we have gone through so far.
So assigning IDs to walls, I believe that same system works to columns and beams as well.
If you wanted to give ideas to those also maybe not, you can always ask at the end of the webinar also.
So let's go continue with this topic.
So setting the numbering mode to manual.
So this will disable ArchiFrame from assigning IDs to the planks when you update the element.
And then let's see all the planks and I select select these all planks and then give IDs to this one to the planks.
And so the first first style I will use just the number 100 is the starting number and assign IDs to all all pieces using this.
Why couldn't it first?
And then the X OK, that it briefly showed that there were, I think it showed 16 different ones here.
And let's see what kind of IDs we have now.
I believe this should be 100 here.
Well, this is then this must not be the lowest one, which may be this one.
But yes, the bottom plate is was 102 as is this one.
And then the most common start we have, I think this one just started without any cuts 101.
You will see it, it's here on in different element.
And also here you have the same ID.
So now if I produce a listing from this, let's do the default listing and group by IDs at least here, here we will see the number of the how many of these 101 we have totally.
So we have 92.
Might be useful when you order the pieces from lumber mill to have it cropped like this.
Then let's use some a bit different ID again.
Select all the planks and use this plank tool.
Give IDs buttons to work with planks and you can include any text into this ID text.
And if they're changing number is not the last one.
So here I want to give the project ID first, then this 100 is the number I want to be changing and this one we can call that.
This is the floor number of the pieces.
So the dialogue frame that this one is the one to change, I need to select it here.
So this is actually the same stuff follow that we have this unchanged text in at the beginning and the end of the idea and then now we will go to to 1st script based type.
So again open the renumber window and like always if you press out shift F1 you will get help from this specific topic.
And there is something I haven't prepared.
You can refer to any object parameter also using this this dialogue here.
But like I said now we are going to use a script and here but the end we have some some information about the script.
The the fixed function names you have to have in your script that ArchiFrame will call.
But let's first see the result if we select this which comes with ArchiFrame kind of example of script.
And for this, we need to give just the starting number and let's see the result.
So the idea here is that ArchiFrame first we'll give the plank a role name before the ID number.
So this bottom plate, that is where this BP comes from
Then for the stud, we have SD, this window window this, this is a beam, so that that's a BE.
And then top plate is TP and one use case is for the bottom plate you first use final select to select all the bottom plates.
So here I simply have enter search all ArchiFrame planks having BP as their ID.
So that's how I get those selected and let's see the ID.
So this 100 hundred 123456 and here we have again 5 and here we have a 2.
So if we wanted to have a a unique ID for each bottom plate.
So you if you pre cut these and deliver to the building site as one package or the bottom plates, it might be useful to have a unique ID for each even if they are similar.
So then again I want this to be the starting one and I'll give IDs to these pieces only.
I check this assigned unique ID, so even if the pieces are similar, they will get different IDs.
Now we have it probably 100 hundred 123 and we have 45678910 and 11.
Especially if you prepare timber that is attached to the foundation, this might be useful.
And then to make this a custom 1.
Now we are going to the code side and let me see if there are any.
I cannot see anything in the chat.
So to the to the code, this example script, it's here in the default data folder.
And all these renumbering scripts, they have to begin with ArchiFrame Renum
So I'll copy this one into our user specific settings folder like you should do if you do any any changes.
So I paste it here, then I give this its own name on file name also just in case.
And open the script and let's let's have a look of the script.
I'll go to the end end of the script and scroll up until we see one of those functions we saw in the manual.
So this is the first one.
This drives the user interface.
So first, this is the name that is listed in the script list.
So I put here on order planks.
And then there is a this the way it's localised today.
So there is if the language is Finnish, then we have the same text in Finnish.
So let's say instead of this BP for bottom plate we want to use BPL.
And understanding this, how this script works is it will take time.
So I will we will just use this as it is today and change that BP to BPL.
And how to find those?
I just search for BP next.
So yeah, this is the Swedish version of something door, window beam, not the one we want to change, but this bottom plate.
So BPL here and then save the script.
By the way this kind of code we have duplicated in couple couple of places in ArchiFrame and Benjamin is currently working on a centralised solution for this.
So there will be one place and you will be able to refer to much more also to the Archicad properties and classifications and any any object parameters with the coming solution.
But this, this works today and you can use this system also in future.
But the new system means that you can do the change to one place and then it will be changed in all places, cut lists, Excel, CNC exports and so on.
This will affect now only this assigning IDs.
So save the script, then in ArchiFrame
Reload all the settings by opening settings and closing with.
OK, And then I'll select everything and assign the IDs again and using our own script and yeah, now I'll uncheck this unique ID.
So we got instead of BP, we have BPL and I I know even in with the users using same language, you might want to use different shortcuts for for these blank rows.
So this is if you use manual numbering then we have possibility to enter custom rules also to the normal inside an element and numbering.
And I will first switch the setting or any questions to this manual numbering way.
I think I just had a general question, Petteri, that I maybe you can answer it at the end.
It's just maybe some tips on people who are editing these scripts for the first time.
Because I know that for some people, it's sort of, you know, when you do it the first time, maybe just some like top tips from you, what programme to use, what to keep in mind.
And obviously they can always get in touch with you.
But I think for some people it's it's a lot to take on the first time you dive into this.
So yeah, this data folder is something you shouldn't really touch because when you install updates, you will take the files maintained by us and you will lose your own own changes.
So like I did here in this case, I copied this to my user specific setting folder and then I used Notepad++.
Well, it's, it's my default programme to open these LUA, LUA files.
This is free to download.
So let's see if I open the browser.
Here you have it.
It is a free one, free download.
And nowadays, of course, it's always, you never know what you get when you download something.
But yes, I I didn't get any anything I didn't want.
Well, downloaded from this site and use.
Let's see where this jumps.
OK, now it's asking permission for for cookies and whatever.
Well, I don't want to answer anything to this, so I go back.
Well, yeah, this is under this note.
Notepad++ website, usually the safe place to download.
If it's under GitHub, I consider that as a safe place, but that that's something for you.
If you don't want to download anything then you can take I think it was Microsoft Visual Studio.
There are many versions of this one.
So the free one will be the core.
I think this this code is the one that is for light use.
But still this is 1 GB download.
So it's it's quite big if you to catch up anything.
But then yes, editing XML with Visual Studio, it includes syntax checker, so you will get warnings, but it's not that plus plus it shows it has the syntax highlighting.
So it's more readable than if you open this the same file in just plain Notepad.
So here no highlighting.
So it's bit more difficult to read.
But this is always fall back to read any text file.
So yeah, Notepad++ or Visual Studio Code.
Then for Mac, unfortunately I cannot answer there is the default text that it comes with Mac.
So that may be the the fall back for Mac users.
OK, so then back to this the element based ID rules.
So I'll change these again to normal ID handling.
So the IDs will be assigned by the element and let's see everything here.
I'll update this first time to get to the default rules so I can have a multiple elements in selection, not triangle process all.
And now now it's used the report rules.
So typical IDs here, Then the renumbering settings they are here.
But the own element settings I have only the single layer element.
Let's change the setting for the core.
It's here at quite the end.
Blank ID assign a script and the one that we have by default is something I don't remember.
So I press alt shift F1 to get some help.
So here I copy the example script we have, premium by role and paste it here.
Let's see what it shall do.
And it's actually best seen in the element wrong.
So switch to that one.
So now with the default rules, the numbering starts always from 01.
And let's see, you know that I change the rule and update is what happens.
So we see that the bottom plate got the number 300, top plate 400.
And then these door window pieces, they are started from 200.
And what I did here, let's go to the XML.
So this ArchiFrame elements this from the default data.
And I used this renum by row to find this place.
And what I did, I copied this script to my own data.
So this is under my own data folder of ArchiFrame elements changes and I haven't done small changes to this one, but let's see what this function gets as as input.
So yeah, it's loaded when you click update.
So it means you can save some data do that is used during the the renumbering process.
Then what you should have returned is a table having that can have these fields.
So ID pre is something you added before the standard number of running number 01, then a post something to add after that number.
And then there there is a special thing.
This is something that is that we will actually skip, skip today.
This is very useful.
So you can define the starting number for separate parts in your element like we had here 300 for the bottom plate.
So let's see in the code where that happens.
So I see here we have the starting number of 300 and the condition here went to use is use that is if the parameter defined the planks role in the element.
If it's one of these bottom fours or second bottom fours, then it will use this number.
And I'll show from article where this parameter is.
So it's here all parameters and it is this group group parameter here.
And again going to the script, this is the line that gets the frug and this is the the internal name of the parameter in the plank object.
And to find the internal name again here Archicad shows only the one that is meant to be visible for the user.
We can see the internal names opening this GDL object and going to the parameters and here it is.
And the difference here with this internal variable name and this one is that this one can be localised.
So if you have the Finnish library, this domain will be different but this will remain the same.
And in the code since we are using the internal it will work with the all possible language versions.
And then yes, we have other possible prefixes.
So let's say the use case will be if we have a plank that doesn't have any cut, which is turned out length, we might have a big, big stockpile of those.
We might want to use special ID for those.
And that's actually what has been coded here.
So let's see what what happens here.
This in this Lua code of defining the variables I'm going to use in this function.
This generates a new Lua table that we will return that will contain the information of how to assign IDs.
You don't have to understand everything.
There is a lot of online material for Lua if you want to study Lua.
But yeah, let's see what happens here.
So here we get these the role in the element, assign it to variable named S and here we check if it's vertical X and yeah, you cannot know really these values, they are somewhere in the manual actually let's see if I can find vertical X sometimes this doesn't always work.
OK, it seems that they are not really listed in the manual so we are left to find it out ourselves.
So checking this window please, I see that this is set to vertical X and then this beam that has bulk top in.
So they they are beginning.
The top of balk will begin always with balk top and then it's in or out if it's inside or outside.
But anyway, here we will we will come to this line if it's a window piece and we'll give the starting number of 200.
And then here if it's any vertical, so any, any start coming from the spacing rule or start at the beginning of the element or next to an opening, it will be 1 one kind of start.
And here we say that the starting number must be 100.
And then we will add text space plus St for start to the end of the ID.
And here, yeah, we give different number if it's started coming from the spacing rule, then it for the spacing rule it will be 100 for the ones next to the opening or at the element left and right hand sides that those will get number of 150.
And here we have some logic to find out if it's a standard, standard timber material, if its length is exactly 2 metres, 2501 millimetre.
And in floating point numbers, nothing is exact.
You have to check if it's very close, if the length of the plank is very close to this value.
So here we allow half a millimetre change from that that exact length.
And then we do another check if it has or it may not have any, any cuts to get to this standard blank ID.
And then you have this.
The rest of the code is similar, just handling different parts of the element.
And here we the main thing we said is this next idea here we have we had a different it will return from the function here not coming to the end.
So a lot of definitions here.
Let's see what happens now with this rule and what we have to do is to make this use our own custom prenum function and let's see what I gave what was the ID was all here.
So I copy paste this one here and then just in case I reload all the settings and then let's update.
So for the starts, this is edge starts.
So it's it's getting ID starting from 150 and it has this SD as a post fix and the full ID of this is it is more it will contain the element ID also.
So this is the part that we actually set here.
And since all these pieces they have some cut, we didn't get any any of these do not have the ID of the stock material.
And to change that I'll do a small change.
I drag this beam so that we have pre starts not affected.
Now let's see 3D now.
So now these are full and let's update, please.
So we got this standard material ID here that could be useful.
Again, these don't have to go to CNC or you know that you have stock of this already for the most common length of start.
And let's see, that's actually all I plan to show today.
So now, now it's time for any, any questions.
I think we, we went quite fast to quite deep.
So just let me know if there is if you have anything you want to know.
Just wondering, in the beginning you said about just doing it for planks and leaving the boards aside.
Just wondered on, is it a similar process there or are there changes coming in the new beta that will impact this or is it just a case of time the process will be the same And let me show the use case for for the boards.
So and yeah, the boards are on wireframe layer.
If you have a fuller board that is, let's say the finish standard size is 1.2 metres by two, 2.5 is 1 standard size.
So if you have that board, you might want to give it the standard ID because you know it's something you don't have to cut at all.
You just take it from the pile and and use it as as it is.
So the process would be similar as used for these standard kind of standard starts.
But unfortunately I cannot show it now.
I haven't prepared it.
OK, I think we have one question.
Feel free to unmute yourself.
Go ahead.
Yeah, Sorry.
You hear me?
Yes, we can.
Hello.
OK, sorry.
So when you have IDs on each individual thing like the top plate, bottom plate, this vertical pieces and they will obviously go up into your text box on the PDF you make top right corner.
Do they get grouped automatically?
Can you somehow affect how they get grouped?
Well, let's see here they confirm 3D.
So they they are already they're grouped here or this automatically generated cut lists.
And if you produce architect schedule and link or define it so that the ID is the grouping criteria, then you will get those combined to the same line also.
And yeah, you mentioned these some of the end results.
So yes, you can produce or the PDF from from this element element today, actually the content is coming here.
So yes, they are grouped there as well as here in this is kind of working, working view.
And then the, the layouts are the publishing version of those.
Yep.
So they don't make their own grips when you're making a new ID for them.
They are processed the same way as if we didn't have this script at all.
But now we, we just added some rules, some different criteria as how to give IDs.
That's OK.
Thank you.
OK, thank you.
That was excellent question.
Do we have any more?
If not, then this code here, this, this might be useful piece of code.
We'll share this.
I think we are going to mix at some point.
We have this happenings blog.
Yeah, I was just thinking about it.
I could include it in, in the first one for sure.
I can add the video and then include this part of the script and, and any other sort of like links maybe to the manual.
Because like you said, we did move quite quickly.
And I'm sure there's, if you're trying it at home, you'll probably want the steps laid out.
So yeah, let's do that.
Let's put it in a blog.
Yeah, yeah.
So from my side, thank you everyone and stay tuned, we will have or you have possibility to vote like like always and we'll have the next one.
Kayleigh knows when, yes, I think, I think we're going to go for April.
And yeah, if you have any suggestions as well, we are obviously pretty good at generating topics inside the team from the developers.
But if you have a topic that you really want, please do just send an e-mail, send a message, and we will be considering all suggestions.
So, yeah, thank you very much.
And I'll see some of you in April.
And thank you, Petteri, for such a good presentation.
I think it was a very good topic and it's nice to do these slightly more niche technical detailed presentations.
Yes.
Well, thank you.
Have a good rest of the working week.
Yes, thanks everyone.
Thank you.
Thanks.
Thank you.