SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
39 stars 10 forks source link

Can assign same name to multiple scenes #261

Open Eneroth3 opened 5 years ago

Eneroth3 commented 5 years ago

The SketchUp Ruby API allows to set the same name on multiple scenes. This should to my knowledge not be allowed, and if you try to name a scene the same as another scene in the GUI, the name doesn't change.

6.times { Sketchup.active_model.pages.add }
Sketchup.active_model.pages.each { |p| p.name = "Same" }
6.times { Sketchup.active_model.pages.add("Same") }

Tested in SketchUp 2018 and 2019.

thomthom commented 5 years ago

Thanks for the report.

Side note: be vary of p variables, as it will shadow the p method in Kernel.

taustin73 commented 4 years ago

SU-44309