Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

FREE for Download - The FreeKeyNote Label Project

NandoMogollon
Expert
Is there any some Merciful GDL Guru with enough time to help me ( and maybe others) to clarify this problem? :

1- The problem:
I am trying to make a custom Label capable of read the information saved on a txt file. It works fine the first time it reads the information, but if you change the content of the text on the txt file, the label doesn't change and in fact it changes the content to the first record on the database (txt file)
2- the question:
Is it a normal behavior? Can I avoid this problem somehow?

I can upload the library part and the txt file if necessary

Please give me some tips

Best Regards

Nando M
Nando Mogollon
Director @ BuilDigital
nando@buildigital.com.au
Using, Archicad Latest AU and INT. Revit Latest (have to keep comparing notes)
More and more... IFC.js, IFCOpenShell
All things Solibri and BIMCollab
40 REPLIES 40
Barry Kelly
Moderator
I forgot to say that it doesn't matter if your text file is in a linked library or in a project folder.
You will experience the same problem in that the object parameter list will update but the 2D view of the object will not change until you physically change the parameter yourself.
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
NandoMogollon
Expert
Hi Barry
I'm going to try a different approach: what do you think about macros or calling objects?
What I'm thinking is this: I know that if you have a single label for each note of the keynote, and if you write the text of the spec directly on the script of that lable instead of using a variable, the label text will update automatically (also its 2D represenration)
I will try to create an object that calls those macros or sub objects and show them as the text of the label. Those sub objects will read directly the content of the database one row at the time.

I'll give it a try and I will post the result.
Thanks for your help so far.
Best regards
Nando M
Nando Mogollon
Director @ BuilDigital
nando@buildigital.com.au
Using, Archicad Latest AU and INT. Revit Latest (have to keep comparing notes)
More and more... IFC.js, IFCOpenShell
All things Solibri and BIMCollab
Ben Cohen
Advocate
One possible solution, rather than using text file input and output would be the use of Library Globals (In verison 13 +).
The interface area for library globals is quite large and could be used to input the required label text. You could possibly have different MVO's setup for elevation, section and plan. the main thing would be the necessity to keep the MVO's updated but this would not be that hard.
The more I think of it, the more its seems viable - . Easy transfer from project to project (Via MVO import and export), view specific keynote text if required, standard keynote text that could be delivered to the label via global_context, very quick calling to the MVO macro and fairly simple to create.

Just my 2 cents worth
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Frank Beister
Moderator
I did it this way, when programming my common label tool Bauteilbeschriftung.GSM.

You have to open, modify and save the macro objects to do changes. For that I inserted a UI to the macros to modify not the code, but the parameters of the object. It works fine, but you have to teach the users to go to inferace script and start the dialog and save afterwars.

Because this was no good way, I changed to use text files instead. But they slow down the object in comparation to macros. Haven't tried to use XML instead.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
NandoMogollon
Expert
Thanks Frank
I'm going to take a look on your approach

Regards

Nando
Nando Mogollon
Director @ BuilDigital
nando@buildigital.com.au
Using, Archicad Latest AU and INT. Revit Latest (have to keep comparing notes)
More and more... IFC.js, IFCOpenShell
All things Solibri and BIMCollab
NandoMogollon
Expert
Ben wrote:
One possible solution, rather than using text file input and output would be the use of Library Globals (In verison 13 +).
(...)
Just my 2 cents worth
Ben, That is a very interesting approach, I can see a lot of potential using library globals. I just don't know enough to venture with it yet.

I'll give it a try.

Thanks

Nando
Nando Mogollon
Director @ BuilDigital
nando@buildigital.com.au
Using, Archicad Latest AU and INT. Revit Latest (have to keep comparing notes)
More and more... IFC.js, IFCOpenShell
All things Solibri and BIMCollab
NandoMogollon
Expert
!! GREAT NEWS!!!!

I think I'm pretty close to a workaround for the last problems.
I will post and upload a beta version for those interested in testing the KeyNote Label.

Thanks for your help, all of you.

Regards

Nando
Nando Mogollon
Director @ BuilDigital
nando@buildigital.com.au
Using, Archicad Latest AU and INT. Revit Latest (have to keep comparing notes)
More and more... IFC.js, IFCOpenShell
All things Solibri and BIMCollab
Frank Beister
Moderator
@Ben
A great idea!

But this needs a carefully handling, when using multiple project files for hotlinks and for layouts! The global settings are stored in the project file, not in the object itself! And you can't transfer the global settings e.g. by the attribute manager.

@Nando
If you think, that this could be part of the openlibraryglobals, please contact me.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Ben Cohen
Advocate
F. wrote:
The global settings are stored in the project file, not in the object itself! And you can't transfer the global settings e.g. by the attribute manager.


Hi Frank

Actually you can. The globals are defined in the Model View Options, and these can be imported and exported from the MVO Dialogue

If I get some time, I will try creating a few example objects. But here is a rough outline of the 3 required parts.

1. an Object with the 'Global Library Settings' sub-type. This will store the label text. This has to have an interface script to work in the MVO settings. I think two columns in an array parameter will do the trick here. One to act as the 'index' for the keynote text and one that contains the actual text. This way you can refer the label to the keynote index, and then change the actual text without losing the index. So an entry may look like this
1.1.2 Concrete as per engineers details
So you reference 1.1.2 from your label, then either get the label to show the referenced 'index' or the actual text itself "Concrete as per engineers details"

2. The label that reads in the Global settings from the MVO's. This would need to be able to read the 'index' for each keynote, then either display the index or display the text. It would also have to use 'rich text' to work well. (Not just the simple 'text2' )

3. A 'Keynote Legend' part that reads in all the global's and formats for placement in your view. It would be possible to have this legend show all the entries that have the index 1.X. or the index 2.X. It would also be possible to have a tick box in the globals that would exclude an entry from the legend - in case there are some entries that need not go through to the legend.

Its a shame I have no need for a keynote system
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Frank Beister
Moderator
Its a shame I have no need for a keynote system
I do have. It was the reason I created my common label object. First I developed the "macro"-version. When I changed to "text-file" source for the list items I first wanted to drop the macro version, but finally left the option inside. Now I just have to move my code to a MVO-gloabl settings object.

You are right, one can export MVO settings. I will try, if a large array of settings will be exported properly.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm