Is there an Update planned in order to be able to import IFC4 to sketchup ?
We will save a lot of time if this update is available. Our Business rely, for a major part, on the import of IFC, being able to import only IFC2x3 is not safe for long term.
I also want layer organisation that exists within the file to also import, regardless of version.
Right now I import through Vectorworks, and export a dwg from there and take that dwg in to sketchup.
Then I can keep the ifc layers, and delete the layers I dont want, with all the fiddle and detailing that bogs down the model and makes it a model of 120mb instead of 25mb
I want a links panel to update each placed ifc, and options for each import to keep the filtering of layers that I chose on last import.
Thanks for this answer, is Vectorworks a free software ?
I guess i can try it but it would be a pity to pay for it, we should be able to import IFC4 in Sketchup directly.
I hope a developer will see this issue and do his best to resolve it.
No, you loose the ifc classification of objects, but you dont need those if you dont export other peoples work back out as ifc. I only export out my own work, with ifc classes, and that model gets put into a main .smc Solibri file by someone else.
However, you maintain layer information, and from that you get to easily delete away the parts of the import model you dont need. So I can keep my model file size sensibly small. For instance I can mount steel engineer models, and filter away all small parts, nuts ans bolts, that I dont need, if they are labelled correctly into layers. The same goes for every engineer model I put into my design.
If sketchup could import layers to tags I would not use this work-around, of course. If I could filter away parts of a model consistantly through the history of updates to a linked ifc-file then the native version will be mature enough to use.
Itās not difficult. Iām on it.
At the moment I can create a new Tag for each Ifc Category of an imported Ifc model.
Iām trying now to apply their tag to each element in the model.
Try this code. I hope someone with much more experience than me could help to improve it because you have to wait at least 1 minute for having every item in their layer but for me it works.
@rtches Here is a script that I use to tag all components according to the obtained IFC classification. The total time of the script below to execute correctly tagging 318 classified objects was less than 1 second.
mod = Sketchup.active_model # Open model
defs = mod.definitions # All definitions in model
tgs = mod.layers # All tags in model
filter_schematype = "IFC 2x3"
mod.start_operation('Classification to Tag',true)
defs.each {|definition|
if definition.get_attribute("AppliedSchemaTypes", filter_schematype) != nil
classification = definition.get_attribute("AppliedSchemaTypes", filter_schematype)
if tgs.include?(classification) == false
tgs.add(classification)
end
definition.instances.each{|instance|
instance.layer = classification.to_s
}
end
}
mod.commit_operation
Do not insert spaces between method call and itās parameter list !
Correct. Module and class identifiers are snakecase (aka camelcase.)
Incorrect.
In Ruby convention is that method names (and variables) are all lower case with "_" underscore between words.
Re, the parameters list:
The use of cryptic variables makes the code extremely difficult to understand.
Instead of dictName, r, ly use more descriptive names: dict_name, comp_def, layers.
Separate arguments with a space ie : method_call(dict_name, comp_def, layers)
This is frivolous, and a waste of memory for the literal string.
You can āshort-circuitā bailout from the method via ā¦
return unless dict # has Schema
You do not need to repeatedly call the #!= method to test if a reference is nil.
In Ruby nil and false evaluate as falsey. Everything else evals as truthy.
Just rely upon the interpreter evaluating the expression booleanwise.
You also save the time taken for assigning an unneeded reference variable.
Here you are taking the time to assign a local reference, but only using it once.
No need to assign the reference here if your only going to pass it as an argument to a method call:
if checkifc23
layer_create_include(dict["IFC 2x3"], comp_def, layers)
elsif checkifc4
layer_create_include(dict["IFC 4"], comp_def, layers)
end
I knew I had a lot of mistakes and I knew I was going to the right person. I am sure that these indications will help me a lot for the following scripts.
Thanks a lot @DanRathbun
As a workaround for IFC4 import, you can open the ifc in Trimble Connect for desktop, select what you need (or just the whole file) and then export the 3D view as TrimBim.
Then import that in SketchUp and see what you can do with it.