How to make a copy of a block?

Hi everyone! Apologies if this has already been answered somewhere as I’m very new to the forum, but I can’t seem to find an answer anywhere! How do I make a copy of a block in my drafts please? I have all by basic blocks on the same draft, and I’d like to make a copy of my front bodice so I can make some changes to it and have both draft options available to use. Any pointers very welcome! Thank you :slight_smile:

2 Likes

I believe that without text editor shenanigans that is not possible at this time. However, such shenanigans are not very difficult if the blocks are not dependent on other block. I just put your bodice front into a new file & it loaded without question. Then I was feeling frisky, & copied the skirt into the same file, but before the bodice. As far as I can tell that worked fine too. I’m guessing there were no dependencies on other blocks with those two sections.

Here’s how:

  1. I made a new plain text file.
  2. I copied the header from your file to the new file.
<?xml version="1.0" encoding="UTF-8"?>
<pattern>
    <!--Pattern created with Seamly2D v0.6.0.1 (https://seamly.net).-->
    <version>0.6.3</version>
    <unit>cm</unit>
    <description/>
    <notes/>
    <measurements>RIR Bodice Sizes 6-22.vst</measurements>
    <increments/>
  1. I copied all of the text from one <draw> tag through its closing </draw> tag to the end of the new file.
  2. Appended an </pattern> to the end of the file.
  3. Saved, (Probably ought to have sooner,) as [file _name].val

It would have been a little harder to include any traced off pieces, but since you hadn’t traced any off I didn’t have to think about that. But I have since removed the skirt, & moved the bodice front closer to the zero point, so here’s the file: front.val (13.0 KB)

Definitely check to make sure I didn’t break anything inconspicuous, but essential!

:unicorn:

3 Likes

Nope… it’s not.

  • List item

Or if you’re copying points having the same name. So yes, it’s easy to copy a block into an empty file, it won’t work if you for example copy block B from one pattern to another that already has a block B - there’s as 100% chance of a name collision starting with the base point. If it were that easy to copy / import blocks we could implement a library of draft blocks. Actually this is exactly how CAD programs work… you can import a block of various objects, such as a block of trees, or furniture, or whatever. Thing is CAD programs don’t have to rely on a set of unique point names to be used in formulas.

Would’ve a “save as” been easier?

3 Likes