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
If you are manually changing the text file (ie outside of Archicad) then you will need to rebuid and regenerate your plan before your lable will read the new information.
Archicad will not constantly check the information in the text file.

I'm not sure what you mean by ... "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)"

Sounds like you are using an "Output" statement in your lable that is writing to the text file.
You only need "Input" to read from the text file.

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
Thanks for the quick response Barry

Let's go step by step:
1. I'm using a TXT file on the project library folder as the DATABASE
2. This database contains 2 columns, column 1 with specs and column 2 with notes.
3. I have created the parameters:" valuelist_a", "filename" and "search" on the Parameter window.

This is the script I am using to "search" inside the TXT file and "select" the text I want the label to show:

------------MASTER SCRIPT----------
 dim value_a[]


ch1=OPEN("TEXT",filename,"MODE=RO,LIBRARY")

!!!!!!!!!!!******counting the total number of rows*********!!!!!

	do
		row= row+1
		n=INPUT(ch1,row,1,string1)
	while n>-1

!!!!!!!!!!!*******!reading both columns for valuelist_c if contains the search string*********!!!!!!!

	for k= 1 to row-1
		n=INPUT(ch1,k,1,string1, string2)
		if strstr(string1+string2, search) then
			s= s+1
			value_a= String1 + ". " + string2
		endif
	next k

CLOSE (ch1)

values "valuelist_a" value_a, custom

Then show the value, for practical purposes let's say we use:
-------------2D SCRIPT----------
  TEXT2 0,0, valuelist_a
Please try it and comment if you want.

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
Barry Kelly
Moderator
Nando,
I haven't tried your script yet but you say you have the text file in your job folder.

Then in your OPEN statement you use the LIBRARY switch.
This needs your data file to be oart of the loaded library.

From the GDL reference ... LIBRARY: If this keyword is present, the data file must be in the loaded library

I use text files (Excel files actually - .xls) in the project folder as well but I do this to find them.


!!Master script
rrr=REQUEST ("Name_of_plan", "", pname, pfullname, ppath)

!print pname
!print pfullname
!print ppath

file_name_start = STRSTR(ppath, pfullname)
!print file_name_start

fold_path = STRSUB(ppath, 1, file_name_start-1)
!print fold_path

filename=fold_path+"_nameofdatafile.xls"


This will find the file (named as you want it) in any job folder automatically.
No need to worry about loading the job folder as part of the library.


I will try to look more at your script later.
Do you have a sample text file you can upload?
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
I will upload a zip file containing the object and the database.

I haven't added your script yet, but Id like to.
The TXT file should be loaded as part of the library, yes, that was in purpose because the parameter string "DIALOG" wasn't working in AC14.

I'll come back soon.

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
Here it is...
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
Barry Kelly
Moderator
Nando,
I have managed to have a quick look at your lable and text file.
It all works really well but of corse the problem with 14 is that when you load the text file into the library it become an embedded object in the PLN.
So you cannot edit the text file.
You need to delete the text file from the library and re-load with out it.
Then change the original text file and add it back into the library and re-load again.
Then you will see the new text.

An other option might be to have it as part of a linked library - haven't tried that yet.
But then you should be able to change the text file and simply re-load the library.

Otherwise have the lable linke to an extenal file directly by using a file path.
I haven't tried that yet but will try to give it a go tomorrow if I get time or over the weekend.

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,
An other option might be to have it as part of a linked library - haven't tried that yet.
But then you should be able to change the text file and simply re-load the library
Actually that is what I have been doing here: loading the Text file as Linked Library. But even if you reload the library (containing of course our txt file) the label does not show the updated text. Note that the object itself - its script - can read the txt file and can recognize the change. You can check that by opening the Label settings window, under Parameters, you will see the "Select an option:" field updated!.

What it means to me is that the script is capable of recognize and read the changes made to the txt file, But is not capable of update the 2D Representation of the text related to that parameter.

Is this an Archicad window regeneration issue?, or an problem with the richtext / paragraph command? or could it be some typical behaviour of the parameters when chosen from value lists?
Otherwise have the lable linke to an extenal file directly by using a file path.
I haven't tried that yet but will try to give it a go tomorrow if I get time or over the weekend.
I will really appreciate if you can give it some time.

By the way, everyone else is invited (if interested), we need "reinforcements".
To the reinforcements: Please download the label, and see if you can give a Diagnosis.

Best 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
If someone else is interested, there is some history about this Long Stand Keynote-Label Wish:

Posted on this forum:

- Erika Epstein : http://archicad-talk.graphisoft.com/viewtopic.php?t=3347&postdays=0&postorder=desc&&start=30
Posted: Sun Jul 25, 2004 1:31 pm Post subject: Keynotes
I would like a keynote system.

Roughly I see it as some combination of the label tool with a text editor.

1. I could optionally display its alphanumeric key and/or the description text.
2. Rearranging the order of a sheet's notes would automatically update the placed keynotes [within that layer combination].
3. It could be connected to one's specifications. (with hyperlinks too)
4. One could have a master keynote list for an entire project
5. One could have separate keynotes by sheet type i.e floor plan, RCP, etc aka the layer combination.
6. It would be a part of the file data that can be extruded from one's model.
7. It would be user friendly.

Other?
_________________
Erika

WinXP SP3
Mac OSX 10.6.2
AC ...,11,12, 14 & MEP
Onuma System

- Oreopoulos: http://archicad-talk.graphisoft.com/viewtopic.php?p=34672&sid=4c571c65dbaafe1395bcfc60f8033f86
Posted: Tue Mar 22, 2005 9:53 am Post subject: Anyone tryied the keynote system from Cadimage

- Scott R: http://archicad-talk.graphisoft.com/viewtopic.php?t=8285&sid=af237f9208bdb0d54f4ef5ebb978fb33
Posted: Fri Oct 07, 2005 7:55 pm Post subject: keynotes and label tool
I have a simple keynote symbol object I use where the keynote number is the object ID, making it very easy to adjust from the info box. I then just use a polyline for the arrow. I am wondering if I can turn this into a label so that the leader line and the keynote symbol are one entity, and if so is there a way to still change the keynote # from the info box.

If this has already been address, please direct me to the correct thread!
_________________
I can't promise I'll try, but I'll try to try
2.4 Ghz Macbook Pro 2gig ram OSX 10.5 256mb Nvidia 8600m AC 9.0/10.0/11.0/12.0

- Bala Raman: http://archicad-talk.graphisoft.com/viewtopic.php?t=15948
Posted: Tue Apr 17, 2007 2:44 pm Post subject: Keynote Label

Does any one know the proper way to load and use the free Keynote Label Object created by "fuzzytnth3"?

I tried placing the downloaded object in a newly created folder titled "3rd Part Objects" and loaded it through the Library Manager. When I tried accessing this new object via the object tool, the folder was not visible although it shows up in the Active Library displayed in the Library Manager window.
!!!******** And I'm sure you can find more*********!!!!

Solutions given by users and companies:

- fuzzytnth3:
Title: Keynote
ArchiCAD version: ArchiCAD 10 Localization: US
Uploaded: Tue Feb 06, 2007 7:07 am Size: 9 Kbyte Downloaded: 1483 times
Description:
A Keynote Label Object It can display either a Keynote Reference or the actual Keynote text. I haven't made a UI to set up the label so you need to edit the 2D and Parameter scripts. This is an updated version that is a bit easier for the end user to use as you now select the actual note you want rather than having to keep a bit of paper next to you to remind you what each ref number means.

Edited on Tue Mar 13, 2007 6:52 am
Link: http://archicad-talk.graphisoft.com/object_depository.php?mode=d&id=198.
- Doug Kunschik:
Posted: Tue Sep 14, 2004 9:24 am Post subject: Re: Keynotes
(...) I'm attaching a screen shot of a test object I've been playing with to study the concept. This object does not read from a text file but instead has notes hard-coded as a value list in the script. The object kinda' does what you're suggesting in point 1. It can display individual alphanumeric labels and/or display a full legend as well.

You'll also notice that I have tried to include custom notes as well - Its sort of a hard-coded and user modifiable object. I'm sure the picture doesn't really fully describe the concept or fully frame the problem, but hopefully Graphisoft will look into giving us this functionality in the near future.
_____________
ArchiCAD 9 (1812 USA FULL)
ArchiCAD 10 (1010 USA FULL)
Link here: http://archicad-talk.graphisoft.com/viewtopic.php?t=3347&postdays=0&postorder=desc&&start=30

- ObjectsOnline:
Link: http://www.objectsonline.com/product_info.php?products_id=1341
- Cadimage: - Probably the only successful solution so far.. for 400 USD -
Link: http://www.cadimageworld.com/products/tools/keynotes
Of course I do not pretend to take Cadimage out of the market, But I do pretend to come with a Free Option.
If you can help, please give us a hand. I know there is a lot of people out there interested on this.

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
Barry Kelly
Moderator
NandoMogollon wrote:
Actually that is what I have been doing here: loading the Text file as Linked Library. But even if you reload the library (containing of course our txt file) the label does not show the updated text. Note that the object itself - its script - can read the txt file and can recognize the change. You can check that by opening the Label settings window, under Parameters, you will see the "Select an option:" field updated!.

What it means to me is that the script is capable of recognize and read the changes made to the txt file, But is not capable of update the 2D Representation of the text related to that parameter.

I see what you are getting at and I don’t think there is a way around it.
Because you have “Custom” in the value list for your “Choose an option” parameter then as soon as you alter the text file that original value no longer exists and so it just assumes you have typed in a custom text value.
Even if you remove the “Custon” value from the value list then Archicad can no longer find a matching text value for the one you have changed. It still displays the original text on the object on screen until you open the object settings.
Then the parameter will default to the first one in the list because it can’t find a match.

As far as I know this is standard behaviour because if you change the text file how will Archicad know which text value to link to. You are searching for keywords in the text list and not choosing by a position such as row 3.

I think what you have done with the “Custom” text value is the best option as at least you can see both when you open the properties and you know it has converted to a custom setting.
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