api-issue-tracker icon indicating copy to clipboard operation
api-issue-tracker copied to clipboard

SketchUp Search shows empty search results with string "Extension Menu Text"

Open 3dmod opened this issue 2 years ago • 6 comments

Issue: SketchUp Search shows empty search results with string "Extension Menu Text"

I am using the case matching version of the "Extension Menu Text", although I do not think that matters?

If I search for the first word of the Extension Menu Text then the Command shows up.

If I wanted a command to show up as the first result in SketchUp Search what string should I use?

3dmod avatar Nov 06 '22 12:11 3dmod

Can you post some screenshots to visualize what you're seeing?

And any sample code to accompany?

thomthom avatar Nov 07 '22 11:11 thomthom

Lets start with this example.

Why is there no results with the Search Criteria perfectly matching the case sensitive "Extension Menu Text"

Screenshot 2023-06-29 at 11 09 27

3dmod avatar Jun 29 '23 15:06 3dmod

FYI, it is very hard to copy code from an image of code (unless one has an OCR app of some kind.)

DanRathbun avatar Jul 01 '23 01:07 DanRathbun

i = UI::Command.new("Pipe on Axis") { self.pipe_on_axis }
i.menu_text = "Pipe on Axis"
i.tooltip = "Put all selected Pipe on Axis."
m.add_item i

3dmod avatar Jul 01 '23 02:07 3dmod

Had a chance to test this today, using:

module Issue842

  def self.pipe_on_axis
    UI.messagebox("Pipe on Axis command.")
  end

  if !defined?(@loaded)

    UI::Command.new("Pipe on Axis") {
      #
      self.pipe_on_axis
      #
    }.instance_eval do
      self.menu_text= "Pipe on Axis"
      self.tooltip= "Put all selected Pipe on Axis."
      self.status_bar_text= self.tooltip
      UI.menu('Plugins').add_item(self)
    end

    @loaded = true
  end

end

I see the best matches occurring with 2 characters as in "Pi". The command is at the top of the list.

The next best match happens with "Pipe " (note the trailing space) where the command is 2nd on the list.

With "Pipe" (no trailing space) the command is not in the matches. (Strange what the other matches are!)

With "Pipe on" (with or without trailing space) there are no matches at all.

Weirdly "Axis" also is a best match with the command appearing at the top of the results.

DanRathbun avatar Jul 01 '23 23:07 DanRathbun

Logged as: SKEXT-3764

sketchup[bot] avatar Jul 17 '23 15:07 sketchup[bot]