Subject: Assistance Needed: IFC Requirements in SketchUp Model
Hello everyone,
I hope this message finds you well. I am currently working on a SketchUp model that needs to meet specific IFC requirements for my client to accept the proposal. The IFC file must include Property Sets (Psets) describing the following information:
A: My name
B: Project group name
C: Discipline of the model
D: My role in the project
E: Company name
I understand that these Psets should be placed under IfcProject, and I am using IFC-Manager for SketchUp. However, I am unable to find a way to achieve this. Can someone provide guidance or assistance?
Thank you for replying @rtches! It is however not enough. I have no problem with putting in Project, Site, building and building storey. What Im not able to do is to include
A: My name
B: Project group name
C: Discipline of the model
D: My role in the project
E: Company name
Do you or anyone else have a tip?
In Solibri it looks like this:
Thanks for getting back to me! I`ve tried to ask ChatGTP for a Ruby Script. It came up with one, but Im not able to get it to work. Maybe its wrong or maybe Im using it wrong-Im very new to using Ruby…:
Ruby script for SketchUp to add Psets to IfcProject in an IFC file
Define the Property Sets (Psets) information
psets_data = {
“A” => “Your Name”,
“B” => “Project Group Name”,
“C” => “Discipline of the Model”,
“D” => “Your Role in the Project”,
“E” => “Company Name”
}
Get the current model
model = Sketchup.active_model
Get the entities of the model
entities = model.entities
Flag to check if IfcProject is found
ifc_project_found = false
Iterate through entities to find IfcProject
entities.each do |entity|
Check if the entity is an IfcProject by checking its definition
if entity.respond_to?(:definition) && entity.definition.name == “IfcProject”
# Access the IfcProject attributes (Psets)
attributes = entity.attribute_dictionary("ifc", true)
# Add or update the Psets
psets_data.each do |key, value|
attributes[key] = value
end
# Set the flag to true since IfcProject is found
ifc_project_found = true
# Notify the user
UI.messagebox("Psets added to IfcProject successfully!")
# Break the loop as we found and updated IfcProject
break
end
end
Check if IfcProject was not found
unless ifc_project_found
UI.messagebox(“Error: IfcProject not found in the model. Make sure you have an IfcProject entity.”)
end