cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

Graphisoft Technology Preview Program 2024

Library Developer Toolkit for 28

Barry Kelly
Moderator

Where can I get a hold of the Library Developer Toolkit for version 28?

It is not in the Tech Preview downloads and the developers website only has up to version 27.

I am attempting to change the default parameters of the Global library Packages to suit my template, but it appears I need the Lib Dev Kit.

 

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
27 REPLIES 27
Peter Baksa
Graphisoft
Graphisoft

Hi Barry,

 

LDT is not needed to set libpack default values.

  • open the template shipped with AC
  • from GDL toolbar / Library Developer menu choose export mapping value table
  • the exported JSON contains meaning names like "Window/bSunshade" where Window is the libpart name, bSunshade is the parameter name. (This is just a naming convention, adding default values for a new library part need more work than just adding an entry to this file)
  • meaning names with three parts can be correlated to the "old" meaning names of Archicad Library 27. These have the same mapping value for all libparts and parameters, altough there could be some exceptions.
  • be careful to modify only values of parameters which are accessible from the user interface. Modifying macro and hidden parameters without reading the code can give unexpected results
  • don't modify values where the meaning name doesn't contain "/" (eg. "AlwaysZero") - those most probably will break something in the library
  • from GDL toolbar / Library Developer menu choose import mapping value table, replacing current table. After saving, the template contains the data, the json is not needed anymore
  • our intention was to include all user-accessible parameters in the mapping value table. If something is still missing:
    • unpack the libpack file with LP_XMLConverter or through Library Developer menu
    • add missing parameters to mappingDefinitions.json, with a new unique - or intentionally existing - meaning name
    • re-pack the libpack file with LP_XMLConverter or through Library Developer menu
    • add mapping value as above

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest
Peter Baksa
Graphisoft
Graphisoft

String parameters' meanings are applied as-is for all localization languages. This means they can't be used to set default value for a string type parameter with localized VALUES. Parameters with VALUES{2} can be given an integer default value, the user will see the localized string.

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Thanks peter,

That seems to be working.

 

Now another question if I may.

When I import the mapping value table into my template file (which worked fine, I got my new parameter default), is the information only stored in that file?

I am assuming it has not updated the global Library itself?

I started a new Archicad with the default template and it did not have the change.

I saved my template and started a new Archicad and opened that saved template and the change was there.

Both my template and the default Graphisoft template are using the same library, so the mapping values are stored in the file?

 

A 2 part question really.

If I am correct in the previous assumption, can I permanently modify the library by unpacking the libpacks and modifying the mapping value file in each pack and then re-packing the library?

 

Maybe 3 parts (sorry).

Is the command to 'Dump mapping value table' supposed to clear the mapping from the file (if it is stored in the file) and resort to the default settings in the libpacks?

I have not been able to test this so far as it just locks up Archicad for a very long time and task manager says not responding so I have to end task.

 

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

I think I may be starting to answer some of my own questions and coming up with more.

 

Exporting the mapping value table will export the entire table stored in the template.

It is not possible to export just the values of a loaded library pack.

To do that you must extract the libpack to see the mapping values just for that library pack.

However not all of the mapping values from the libpack have actual values.

For example parameter "A" is fine ...

BarryKelly_0-1721893206610.png

 

But the gs_fill_type has no default so i assume it gets that from the

BarryKelly_1-1721893285280.png

 

So the defaults must be saved in a value table in the template itself.

 

Which means we need to edit the mapping value table in the template - which is huge.

That is why we need the Lib Dev Kit because I believe there is a tool that will convert the mapping table JSON file into a .CSV file that can be opened in Excel and filtered so we can edit just what we want.

 

Without filtering, we can't do a simple find and replace, because in some objects the fill may need to be solid and in others empty.

 

So is there a Lib Dev Kit that has a tool to convert JSON to CSV and back, or is there another way to do it.

I am trying to convert as shown in the video posted here ... https://community.graphisoft.com/t5/Feature-discussions/Library-Packages-for-Archicad-28/m-p/600624/...

 

 

The 'Dump mapping values table' eventually did un-freeze after about 10-15 minutes, but i could tell if it did anything.

The parameter default that I changed before was still changed.

It did not revert back to the defaults of the global library.

So if 'dump' is supposed to mean delete or clear, it doesn't seem to work.

If it means something else, then what might that be? - is it just dumping into the 'report' window?

 

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

Now another question if I may.

When I import the mapping value table into my template file (which worked fine, I got my new parameter default), is the information only stored in that file?

I am assuming it has not updated the global Library itself?

I started a new Archicad with the default template and it did not have the change.

I saved my template and started a new Archicad and opened that saved template and the change was there.

Both my template and the default Graphisoft template are using the same library, so the mapping values are stored in the file?

Yes, it is in the plan/template file, not the libraries.


If I am correct in the previous assumption, can I permanently modify the library by unpacking the libpacks and modifying the mapping value file in each pack and then re-packing the library?

No, the libpacks contain a mapping definition file, which define parameter->mapping name associations, but no values. You'd have to also unpack the lcf, de-compile gsm to hsf, change paramlist default values, then re-compile everything to libpacks to permanently change the library.

 

Is the command to 'Dump mapping value table' supposed to clear the mapping from the file (if it is stored in the file) and resort to the default settings in the libpacks?

I have not been able to test this so far as it just locks up Archicad for a very long time and task manager says not responding so I have to end task.

No, it is meant to write mapping value table to the session report window. It locks up AC for a few minutes, better to use the Export Mapping Value table command.

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Thanks Peter.

On closer inspection I noticed that the mapping table in the library packs is different to the mapping table exported from the file.

 

Having the tool that can convert the JSON file to a CSV and back may be beneficial in the future so we can easily filter for just certain objects.

 

But for now it should be a simple case of swapping a Graphisoft template attribute for my template attribute.

When ever pen '4' is used in Graphisoft template, I want it to be pen '11' in my template.

Or if background fill '65' is used by Graphisoft objects, I need it to be fill '63' in my template.

So, it should be a matter of replacing all parameter instances in the exported mapping table, and I shouldn't need to set differently object by object.

 

A quick test last night and it seemed to work for some parameters but not for others.

Probably something I have done wrong, so I will keep trying.

 

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
KevinP
Booster

This may help you filter JSONs:

https://taffydb.com/

 

 

SeaGeoff
Ace

A comment and a question for @Peter Baksa or anyone who knows…

 

Comment: From what I can tell the mapping values JSON file has nearly 300,000 lines. Online tools I have tried warn about the size and potential to crash my browser. Opening directly in Excel does not work because the dataset is too big. With Global Libraries here to stay for the foreseeable future we need tools with a user friendly UI to work with these huge files. These tools should be provided or approved by Graphisoft.

 

Question: If I am not mistaken the library folder structure—as seen in object settings—can vary depending on the template. Thus libraries in the USA template are organized the same as the previous monolith libraries, same for each localization. Am I correct about this? If so, how and where is that controlled?

 

Thanks.

Regards,
Geoff Briggs
I & I Design, Seattle, USA
AC7-27, M1 Mac, OS 14.x

@Peter Baksa wrote:
  • be careful to modify only values of parameters which are accessible from the user interface. Modifying macro and hidden parameters without reading the code can give unexpected results

@Peter Baksa 

Would you mind expanding on this one a little please.

Are you saying that hidden parameters can't be modified, or they can be but something different has to happen.

 

For example I am trying to met the default library to work with my template (at least 95% of it is good).

But some objects have hidden parameters (how are people supposed to adjust these - but that is a different issue).

 

There is a "Parking Places Polyline" object that uses a background fill (65) with white pens (19).

This relates to a hatched (weatherboard) fill and yellow pens in my custom template.

So, of course it does not look correct.

 

BarryKelly_0-1723104850557.png

 

 

I have tried creating the values in the JSON file following the format for non-hidden parameters.

 

{
"meaning": "Parking Places Polyline/gs_fill_type/Fill Type",
"type": "FillPattern",
"value": 67
},

{
"meaning": "Parking Places Polyline/gs_fill_pen/Fill Pen",
"type": "PenColor",
"value": 10
},
{
"meaning": "Parking Places Polyline/gs_back_pen/Fill Background Pen",
"type": "PenColor",
"value": 10
},

 

 

But this does not seem to work with hidden parameters.

Is there some trick to this or is it that hidden parameters simply can't be controlled?

 

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

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!