How to Enable/Disable 'Preserve Drawing Origin' using ruby API?

In my Sketchup extension, I need to create an option for importing DXF files.

I am planning to use the model.import ruby API to achieve the same. But this API does not provide any facility to enable/disable the import options such as Preserve Drawing Origin , which is generally available under Options section while importing AUTOCAD models using the File -> Import option.

Is there any way to enable/disable the Preserve Drawing Origin option using ruby API ? Or do we need to create a custom Importer to achieve the same ?

1 Like

Import and export via the Ruby API is limited at the moment.

For the Cities Skylines extension I wrote I needed to set the export settings - and had to manually adjust the registry/plist settings in order to achieve that. It required some reverse engineering and it’s fragile - prone to break upon new versions of SketchUp.

But if you acknowledge the risk and want to experiment you can inspect the code here: