Error in Model.import function for dae file in SketchUp2023

Hi all,

I am using SketchUp customized with Ruby.
In your Ruby program,

options = {
:validate_dae => true,
:merge_coplanar_faces => true,
:show_summary => true
Sketchup.active_model.import(fileName, options)
and call.
I tried to read a .dae file with this code.

If this process is executed with SketchUp2023 for mac version(v23.0.396), it will end with an error.

It worked without problems in SketchUp2023/Win version.
In addition, It worked without problems in SketchUp2022/Mac or Win version.

If this .dae file is imported from SketchUp2023 Mac’s File menu,
it imports fine.

Is this a programming issue or an API issue?
Please let me know if anyone knows the solution.

Thank you very much.

export_out.dae (240.9 KB)

Please try to post your code according to this:

What error?

Message is fail to import (in Japanese) by dialog.
Also, the function returns false.

The code is like below.

def import_dae()
	filePath = "/tmp/export_out.dae"
	options = {
		:validate_dae => true,
		:merge_coplanar_faces => true,
		:show_summary => true
	res = Sketchup.active_model.import(filePath, options)
	puts("import result=#{res}")
1 Like

I do not see problem with the code itself…The only thing I can suggest to define a full path for the filePath (?)

Unfortunately I can’t test - no experience - on Mac, the .dae file itself looks good too…

Additional Information

I had no problems with SketchUp2023/mac on my M1 MacBook Air.
An error occurs only with SketchUp2023/mac on Intel Mac mini.

Try changing some of the options …

def import_dae(caption = 'Import Collada (DAE)')
  win = Sketchup.platform == :platform_win
  ext =( win ? 'Collada Files|*.dae||' : '*.dae' )
  file_path = UI.openpanel("#{caption} ...", Sketchup.temp_dir, ext)
  return unless file_path
  options = {
    :validate_dae => true,
    :merge_coplanar_faces => true,
    :show_summary => true
  title = 'Import Options'
  prompts  = ['Validate Dae','Merge Coplanar Faces','Show Summary']
  defaults = [
  choices  =, 'true|false')
  opts = UI.inputbox(prompts, defaults, choices, title)
  return unless opts
  options[:validate_dae]= opts[0]
  options[:merge_coplanar_faces]= opts[1]
  options[:show_summary]= opts[2]
  res = Sketchup.active_model.import(file_path, options)
  puts("DAE import result: #{res}")

NOTE: The DAE import summary dialog is not working correctly.
It flashes on the screen so fast it cannot be read.

I did a test.
The following combinations are executed, and “Import failed” is displayed for all.

the meaning of the number
(1) Validate Dae, (2) Merge Coplanar, (3) Show Summary

test combination
(1) true, (2) true, (3) true => fail
(1) false, (2) true, (3) true => fail
(1) true, (2) false, (3) true => fail
(1) true, (2) true, (3) false => fail
(1) false, (2) false, (3) true => fail
(1) true, (2) false, (3) false => fail
(1) false, (2) true, (3) false => fail
(1) false, (2) false, (3) false => fail

thank you.

Okay please file a API issue in the tracker. Be sure to note the version and that it’s a Mac Intel only issue.

I got it
I will apply for a tracker.
thank you.

1 Like