Extension for repeated selection operation?

I need to select every other model in this row. I have seen one time something about a plugin that would memorize the operation and do it automatically… Does anyone know a extension that could make this?

I think you mean this one: SketchUp Plugins | PluginStore | SketchUcation
It doesn’t do what you want though…

I think this can help you. It’s a @thomthom extension


In a situation like that it would be far simpler to delete all but the first and third, then do a linear array of the first one using the third as a guide, the appropriate number x, then delete the extra one in the third position…
GIF 20-11-2023 9-55-29 AM


yes. But its because its to much and every direction in the model. That was only a example

When using and learning to use software, and just about anything else, it is important to get a full understanding of how things work to enable you to have an efficient workflow.
All too often people want Extensions to do things that essentially ‘fix their errors’, when what they really need is a method of thinking ahead and planning their model.
I can pretty safely say there isn’t a current extension that will repeat an offset selection in the manner I think you want, but a different way of looking at your model may make it all very simple.
I often create complex models that I will mostly delete because the structure is what I need to understand to repeat the process with various arrays of components.
So, your example suggested one option to me, but the full complex ‘problem’ may well suggest something else.
It is like the correct basis of an education, we don’t go to school, college, university etc to learn ‘facts’, we go to learn how to learn, how to question, hypothesise, think for ourselves, absorb information and apply it to how we interact with the world around us. A skill that appears to have been stolen by social media.
Getting fully in touch with the Sketchup fundamentals can help you look for a better workflow rather than fighting with the things that ‘sometimes are not the same as other software’.


Yes, I completely agree. But most of the cases I receive files from other people who don’t plan well when designing on it.

The tricky part with selecting every second object is getting the computer to understand the sequence of the objects. To a human it’s obvious from looking at them but to the computer you need to compare the distances.

Luckily I wrote the code for that 6 years ago for Eneroth Point Connector.

def sort_points(points)
  return points if points.size < 3

  # Find the most extreme point to use as starting point by sorting all points
  # by their proximity to their second closest other point.
  points = points.sort_by { |pt0| points.map { |pt1| pt0.distance(pt1)}.sort[2] }

  sorted_points = [points.pop]
  until points.empty?
    points = points.sort_by { |pt| pt.distance(sorted_points.last) }
    sorted_points << points.shift


With a little new code to extract the origin points for the selected groups/components, sort them with the above code, iterate over the objects and see whether their points are at an odd or even position in the sorted list of points, you can select every other object.

# Assume only groups and components are selected
instances = Sketchup.active_model.selection.to_a
positions = instances.map { |i| i.transformation.origin }
sorted_positions = sort_points(positions)

instances.each_with_index do |instance, i|
  if sorted_positions.index(positions[i]).even?