First of all, the number of arguments in existing API methods cannot be changed because this would break extensions out in the world that are not expecting a different number of arguments.
So your request as written will not happen. It could be a new “import_at
” method.
EDIT: However, since 2018 the 2nd arg is an options hash. Additional options CAN be added without being a breaking change. So we could have a :transform
option that could skip the placement.
NOTE: The feature request (#271) has been rejected and closed. The API team feels it is too problematic to extend the Sketchup::Model#import
method any further.
For more information, please read their reasonings in the linked issue thread.
Also new for SketchUp versions 2021.1 and higher is a DefinitionList#import
method.
The method you seek to change has a documentation note that directs readers to this new method if they do not want the placement tool activated.
Have you compared the speed of this new method to Model#import
?
BUT … the real issue is …
This should not be the case and would be the real place to put effort for a fix.
Secondly, this is already possible with existing methods.
I show an example for importing a 3DS file here …
Use it as a starting point to modify for your own use to import a SKP instead.
Basically you must send the SketchUp application an ESC keystroke to cancel the placement of the new imported component instance. Then your code adds an instance of the import using the desired transform.
It is up to you if you wish to explode the new instance (and purge the definition list.)
Please use the options hash or named arguments for SketchUp versions after v2018.
Sketchup.active_model.import(path, show_summary: false)
Are you still running SketchUp 2016 as your forum profile states ?