I try to insert many components (i try with 1000 and more) but it’s take to many time to insert all components. How can I make it more faster pleaz
Actually i use this :
foreach (components)
_ #I Inititalise component before but i test it and there is no time problem with this._ transf = Geom::Transformation.new insertion_point new_instance = entities.add_instance component.componentDefinition , transf
end
The problem is just on this line
new_instance = entities.add_instance component.componentDefinition , transf
that work quicly with 10 component but with 1000 and more that to long (approximatly 15 minutes)
Thanks for help
Have you wrapped your code in an operator? The operator makes all changes performed by the code use the same slot in the undo stack (which means undoing once undos them all) and can also be used to prevent SketchUp from redrawing the view between each change.