cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
GabrielGG
Booster

Global Library 29 Update 1 ... Compatible with Archicad 28? + Management of Libpacks in the BIMcloud

Hello,

 

I always thought that the interesting thing about the Global Library is that it's independet of the Archicad Version Running.
With Archicad 28 the Global Library had no "28", now it has become the "29" and I'm a bit confused because I thought the Global Library Update Version would be independent of the Archicad Version Nr.

 

My simple question is ... It's the Global Library for Archicad 29 comppatible with Archicad 28?

Will this be like this in the future? Global Library for Archicad 35 will be compatible with Archicad 28?

 

It's very Important for me to get some clarity about this, to configure properly how the Libraries are organized in the BIMcloud.

 

I also think the Mappiing Values of the Library 29 Update 1 are still not Online, maybe somebody can confirm it.

 

Thanks in advance

 

Since Archicad 11
Currently at Franz&Sue Zt GmbH
11 Replies 11
Funfun Yan
Enthusiast

Hi Gariel, Could you please show me the Python script for the mapping values you mentioned? Cause I didn't find the py file that GS mentioned in one video.

GabrielGG
Booster

Hi @Funfun Yan,

 

sorry I didn't answered sooner.

HEre is my Script, I use it to edit all attributes to add 9000 to the index-Nr. (becase don't use the Standard Graphisoft Attributes in our office) and it defines some exceptions to this rule (becase some Standard GS Attributes attributes can't be deleted).

You can copy this text and put it in the text-Editor, save the file with the extension *.py and you can run it with Microsoft Visual Studio Code or other Coding Applications.

 

Since not so long there a new community tool to edit the json files. Here you can find it
The Evolution of Editing Object Defaults in Librar... - Graphisoft Community

 

I hope this helps

 

SCRIPT START

import json
import os

# Define the directory containing the JSON files
directory = r'C:\Users\gabriel.gordillo\Documents\JsonEDIT_Bearbeitung'

# Define the types and exceptions
types_to_edit = {
"BuildingMaterial": {
"skip": [0],
"special": {35: 9083, 37: 9015}
},
"Material": {
"skip": [0],
"special": {}
},
"LineType": {
"skip": [0, 1],
"special": {}
},
"FillPattern": {
"skip": [0, 22, 23, 24, 64, 65, 140, 141],
"special": {18: 64, 108: 64}
},
"Profile": {
"skip": [0],
"special": {}
}
}

# Function to update values based on type and exceptions
def update_value(entry):
entry_type = entry.get('type')
if entry_type in types_to_edit:
exceptions = types_to_edit[entry_type]
value = entry['value']

# Check for special cases
if value in exceptions['special']:
entry['value'] = exceptions['special'][value]
# Check for values to skip
elif value not in exceptions['skip']:
entry['value'] += 9000

# Iterate over each file in the directory
for filename in os.listdir(directory):
if filename.endswith('.json'):
file_path = os.path.join(directory, filename)

# Load the JSON data from the file
with open(file_path, 'r') as file:
data = json.load(file)

# Update each entry in the JSON data
for entry in data:
update_value(entry)

# Create a new filename with "_Index9000er" appended
base_name, ext = os.path.splitext(filename)
new_filename = f"{base_name}_Index9000er{ext}"
new_file_path = os.path.join(directory, new_filename)

# Write the updated data to the new file
with open(new_file_path, 'w') as file:
json.dump(data, file, indent=2)

print(f"Updated {filename} to {new_filename}")

print("All files processed successfully.")




Since Archicad 11
Currently at Franz&Sue Zt GmbH

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!