I use the import function regularly to bring both SketchUp (.skp) and AutoCAD (.dwg) files into my drawings with relatively equal frequency. Unfortunately the import dialog box will only show one file type at a time. I’d love to have the option to view all supported files at once, which would save me the trouble of constantly having to change the filter back and forth between .skp and .dwg.
I posted some test code in the Ruby API category (see link above.)
One of the issues will be that many of the import file types have unique import settings.
(The concept code does not manipulate the import settings like you can do with the native import dialog. Mimicking this would be too much work for a simple test.)
Aren’t those saved in the PrivatePreference.json? Or in another format for version <2017?
At one time, I remember I could drag .dwg in the active model window after setting the option for the first.
The setting for images (as texture, as image or new photomatch) are also saved.
Yes, in the Registry for Windows. @thomthom has code posted that can read from the old registry format.
Yes, BUT … it is not about program access to user settings OR … about even applying the settings for such a command. (This is possible.) It is the fact that at the time that the file select dialog is VISIBLE and HAS FOCUS, … the file type that the user wants is unknown to the code because the user has not yet selected the file.
So the code does not know what kind of file and therefore what set of options to display, until AFTER the dialog returns a valid path string to a file. (As said, this means we cannot use the Importer class’ Options… button at the bottom of the dialog.)
So then such a command would have to present an options dialog each and every time the command was used, and the user could just click OK to use the previous options as already set, if no changes were desired.
BUT, again, if you go look at Thomas’ code, it is a bunch of extra work to implement dialogs for ALL of the supported filetypes. IF anyone wishes to and has the time, … FEEL FREE.