Export to svg - filename


Why is there always a number “1” in the filename? Export from piece mode. image


LOL, yes, @SewingEngineer. It’s a throw-back from times long gone. The number is supposed to increment with each save with the same name, but it doesn’t do it. I keep meaning to talk to @Douglas about it :rofl:


Well… you just did. Lol

Since I’ve already done some updating of the exports, it should be a rather easy fix.

Update: Took a quick look at the code again… the original purpose of the “_1” when exporting SVG’s is because the export SVG dialog was just for exporting layouts, and since layouts can contain multiple pages, the _1 would increment with each export of a page as a separate svg. The dialog wasn’t designed to increment when saving a draftblock or the pattern pieces IF the filename already exists.

Basically put… the filename label to the right has no meaning when exporting draft blocks or pattern pieces, it’s only there as an odd way to indicate that layout exports will increment starting at _1. I’ll make the dialog adapt to the mode that’s being exported.

That being said… what’s the thoughts on having the export file name include the mode as an option?

For example: mypattern(block)_1.svg mypattern(piece)_1.svg mypattern(layout)_1.svg

1 Like

Looks useful! Maybe without parentheses and underscore instead might be more readable?

1 Like

With exporting from all three modes now being an option, I think that’s a very good idea, at least as far as the default name goes.



I don’t mind either way. I like to put my own labels, so I’ll be really happy just to lose the _1. I only use this for nesting, so the files go into a special folder and are saved in the size… 34.svg, etc.

That’s why I figure making the file name format user configurable. Besides, one could always override the name in the dialog.

Well that’s my thinking… it could help distinguish what mode type the export file is.

We could do that. Would shorten the name length by 1 char too. I also gave it some more thought… I think the copy number should follow the name, and should have a leading 0 - sorts better. Followed by any optional mode type… such as:

MyPants_02_block svg



I made some headway fixing the Export dialog.

First I made the dialog - which is used for exporting from a 3 modes - use the mode to adjust the display accordingly. So for blocks and pieces it doesn’t display the “example” file name. exportpieces

Then I fixed the “layout mode” display to show what files will actually be saved, based on the number of pages in the layout. What a novel idea. :wink:


Just need to work on the optional mode text in the filename(s).

1 Like

Ok… Think I’m finished for now. Only thing I wanted to fix, but requires too much refactoring is to have the Export Dialog stay open when a message box pops up warning file names exist.

Which brings several corrections I made to the Dialog and Message Box. The dialog now has what is considered the more appropriate Save button vs Ok. Ok dosen’t tell a user what the dialog is specifically doing - Save does.

Draft Blocks : export_block

Pieces: export_pieces

Layout: The dialog will now distinguish between multiple export files, which will increment, and a single file - such as a tiled PDF.



And the existing file message box - renamed to Confirm Export, will display

Single file: single_confirm

Or multi files: multi_confirm

Besides rearranging and making the dialog layout adapt depending on export mode, I added a spinbox (minus <> buttons) to display or enter a (compression) quality value.

There’s a bunch of stuff that happened under the hood, but I think that’s it for now. Hope it makes a bit more sense now.


Oh, wow! @Douglas, thank you very much. I’ll check it out. :star_struck:

Well… you will have to wait till I push the changes and they get merged. :slight_smile:

1 Like