Critical error : Exception draw is not defined in the scope


I have this error message : Critical error : Exception draw is not defined in the scope 2019-05-14_15-20-50

How can I fix the file? See the file here : 6 - Leggings - patron base_v1.val (49.6 KB)

I tried to open the file with Notepad++ to check if I could identify the problem, but I can’t…

Thanks for your help!


1 Like

Hi Simon, I ran your pattern through the parser at and produced this listing seamly-tmp.pdf (109.1 KB) of the steps you used in construction. Perhaps this will help you to identify the problem. Please take a look and let me know whether it helps.


1 Like

Hi Kim,

Thank you, but I don’t know if it helps.

At some point, I remember erasing some points and having an error code but the pattern was still working…

Is there a way to identify and change the “value in line 3 column 31” ? It seems to be the problem in the error message.

1 Like

If you are able to make a earlier version of the file, let’s say at the page 16, it would be great. I think the problem was in the last steps of the pattern…


1 Like


I need to know how you produced the file. I opened it with an xml editor and compared it against other properly formed files created by seamly2D and it appears that the file was damaged during an attempt to manually edit it with Notepad. We really can’t support all possible errors that could be introduced by such manual editing.

If I am mistaken and the file was formed in this way by the seamly2d program, it would be really helpful if you could help to reproduce the steps you used to create it.

That said, I fixed what appeared to me to be the issue with the file but I have no way to test it without the .vit file that you use with it. Here is the version I corrected.

The issue was that the xml statements that belong in the front of the file before the <draw…> statement were moved to the outside of that clause, after the < / draw >. Here is the corrected file. 6 - Leggings - patron base_v1-AA.val (49.6 KB) If you want me to do anything else with it, I will need to have the .vit file that goes with it.


Thanks a lot! It is working.

I’ve opened the file in Notepad but I didn’t make any modification with Notepad as far as I know, because the error occured before I opened it with Notepad.

It’s hard to reproduce the steps I used to create the pattern. It is a derivative from another one : 5 - Short shorts Block - patron base_skintight_v2.val (30.6 KB)

1 Like

Interesting. I have never seen this type of error before. @Grace have you seen an error like this? It seems like an easy thing to do by mistake in a text editor but I have never seen it in a file generated by Seamly2D. (compare Leggings - patron base_v1.val, with the version that I fixed and returned with the name Leggings -patron base_v1-AA.val)

@simoncotelapointe, please let us know if you see a similar problem in the future and provide if you can the “before” file that works along with a description of what you were doing before it failed. If you can help us to reproduce the error without using a plain text editor such as notepad, I will add it to the issue list.

As I said, we are unable to support issues caused by modifying the xml source of a pattern file manually. That said, I suggest that if you must open the xml source with an editor it is probably safer to use something such as XML Copy Editor (open source available at Use of such a tool will show you a more readable view of the xml.

1 Like

Hi @kmf, yes, I have seen it before where the opening arguments are at the end of the document. Can’t remember if it was last year or the year before. What caused it the last time was that the person tried to copy and paste parts of one pattern into another pattern instead of opening the pattern to be copied, renaming it and building on it (I don’t know if this makes sense to you). But I repaired it and didn’t add it to bugs because I didn’t feel that it was one :slight_smile:

1 Like

It probably should be written up as an issue and fixed. before that, it is best if we can find a way to reproduce it.

1 Like

As I said, the previous one was because someone was copying & pasting bits and pieces into the file using a line editor, which isn’t the case here. And also, the previous one was on a previous version of Seamly2D, if I recall.

@simoncotelapointe, please, what version of Seamly2D are you working with?

OK, thanks for the help and the information!

(Just had your message because I have another problem)

I’ve just downloaded and installed the version and the message said this version was already installed… So I guest it was this version I used.

I have the same type of error : “Critical error : Element draw is not defined in this scope”. It’s strange because when I’m working on the pattern, there’s not problem, but when I save the file and try to open it, it does this error… (That’s why I have two files with the same error.)


9 - Female bodice Block_no dart.val (11.0 KB) 9 - Female bodice Block_v2.val (11.9

How can I fix the files?

Thanks for your help!


1 Like

I need the measurement files as well, please. Otherwise I can’t check if the they work.

Here are your files back. I haven’t checked them, but they do open up to where they ask for the measurements file:

9 - Female bodice Block_no dart1.val (11.0 KB) 9 - Female bodice Block_v2-1.val (11.9 KB)

Yes, it’s working. Thanks!

Here are the measurements : MC_mesures.vit (6.2 KB)

What could be the problem? Maybe it’s when I add complex formulas like this one : (((Line_Waist_A6 + Line_A2_A8) - waist_circ/2)/6) *0,7

1 Like

I’m happy it’s working. I can’t see that a complex formula would create the problem.

I’ve had that same problem before. It takes the lines of the pattern (about from line 2 to about line 7) and places them at the end of the file. I can’t think why it does this for some patterns. I’ve fixed a number of patterns where this has happened but it’s never happened to any of my patterns.

It defies my sense of logic :slight_smile:

Taken from your original file that you sent me:


And this after I’d moved the lines to the top:


If you can explain how, exactly, you work, (do you save to the cloud somewhere, or on an external drive, just step-by-step what your general procedure is - what you do without all the actual drawing, layout and printing) perhaps we can identify why it’s happening. So far, everyone’s been just too happy to have their files working again :slight_smile:

1 Like

I save the file in another folder and drive (D:) on my computer than the original installation folder/drive (C:). Maybe it could be the problem? If I remember well, the error did not happen before I’ve changed the patterns folder to another drive.

Or maybe another clue would be that I use a previous version of the pattern to create one. If I remember well, the errors occurred with both files based on previous patterns. For example, I save the pattern with another name and after that I erase some lines and points and start to create the new pattern…

Hope it helps!:slightly_smiling_face:

1 Like

Thank you for that. :slight_smile:

I’m going to see if I can recreate the error by saving a pattern to a different drive. Did you change the preferences to the different drive, too?

I don’t think it’s the 2nd option because I do that all the time. I’ll come back to you later and let you know what happens :slight_smile:

I saved a pattern to my external drive and it didn’t do anything, so I guess it’s not that, either :frowning:

Yes, I have change the preferences to the different drive.

1 Like