Answers.Body: <h1>So I ended up figuring out a solution:</h1>
  <p>First, I tried manually editing the vix file as a text file, and inserting this <a href="https://pastebin.pl/view/589f6c5e" rel="nofollow noreferrer">code</a>.
  <a href="https://i.sstatic.net/Ts4MN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Ts4MN.png" alt="Picture of code inserted in ev3g" /></a></p>
  <p>Opening this file would crash the software.<br />
  <strong>However, if you didn't open it, it would work fine on the EV3 brick!</strong><br />
  From this, I concluded, that the problem is with the EV3 vix editor.<br />
  But identifying the problem wasn't enough, I needed to find a solution.</p>
  <p>After looking around the ev3 program files, I noticed that they use the exact same format as a vix file.<br />
  <strong>Except this single line:</strong><br />
  Original:</p>
  <pre><code>&lt;VirtualInstrument IsTopLevel=&quot;false&quot; IsReentrant=&quot;false&quot; Version=&quot;1.0.2.0&quot; xmlns=&quot;http://www.ni.com/VirtualInstrument.xsd&quot;&gt;
  </code></pre>
  <p>Changed:</p>
  <pre><code>&lt;VirtualInstrument IsTopLevel=&quot;false&quot; IsReentrant=&quot;false&quot; Version=&quot;1.0.2.0&quot; OverridingModelDefinitionType=&quot;X3VIDocument&quot; xmlns=&quot;http://www.ni.com/VirtualInstrument.xsd&quot;&gt;
  </code></pre>
  <p>Now, you can change this single line in your vix file, and the ev3g software will open it in the default editor. You can drag blocks, and also use the vix elements.<br />
  One disadvantage is that for some reason the vix terminals are invisible. But you can still select them, if you know where they are.</p>
  <p>If you have any more questions, ask them in a comment, and I will answer.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-01T08:31:16.733Z
Answers.Text: Seeing that the question has remained unanswered for a month, I'd say there is definitely a knowledge gap which you are now best positioned to solve for the sake of people browsing this site in the future :)
Answers.UserDisplayName: zovits
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-01T13:48:21.263Z
Answers.Text: Should I keep the answer this way, or change it into instructions?
Answers.UserDisplayName: MoCsabi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-01T18:16:16.053Z
Answers.Text: I like this answer as it is, even though I can't readily see the relevance of the long code block in the beginning. The crux seems to be in the `OverridingModelDefinitionType="X3VIDocument"` part of the changed line, which should be understandable to anyone who could realistically be faced with this problem. So thanks for a great answer, you made quite an impressive entrance!
Answers.UserDisplayName: zovits
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-31T12:11:33.033Z
Answers.LastActivityDate: 2021-09-03T15:12:11.097Z
Answers.LastEditDate: 2021-09-03T15:12:11.097Z
Answers.UserDisplayName: MoCsabi
Body: <p>My team and I are trying to convert our coding framework made of myblocks into actual blocks. I made an application, that generates a &quot;shell&quot; of the block (the modes, and parameters). After this, we would copy our myblock's content to the VIX Editor. This works fine, except when it comes to switches. In that case, it crashes instantly. So instead, we tried using the default VIX switch (from the palette), but those don't support the wires we use to connect our blocks, and gives an error.
  <a href="https://i.sstatic.net/yL8ve.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yL8ve.png" alt="Screen of EV3-G developer edition" /></a></p>
  <p>It says &quot;There is no valid source wired to this tunnel&quot;</p>
  <p>This is my first question here, so I probably didn't provide enough information, please tell me what else should I provide.
  Thanks!</p>
  
Tags: <programming><ev3-g>
Title: EV3-G custom block crashes when Switch statement is copied
UserDisplayName: MoCsabi
ThreadText: # EV3-G custom block crashes when Switch statement is copied
  
  (Asked by: username_0 on 2021-07-09)
  
  My team and I are trying to convert our coding framework made of myblocks into actual blocks. I made an application, that generates a "shell" of the block (the modes, and parameters). After this, we would copy our myblock's content to the VIX Editor. This works fine, except when it comes to switches. In that case, it crashes instantly. So instead, we tried using the default VIX switch (from the palette), but those don't support the wires we use to connect our blocks, and gives an error.
  [![Screen of EV3-G developer edition](https://i.sstatic.net/yL8ve.png)](https://i.sstatic.net/yL8ve.png)
  
  It says "There is no valid source wired to this tunnel"
  
  This is my first question here, so I probably didn't provide enough information, please tell me what else should I provide.
  Thanks!
  
  **Tags:** programming, ev3-g
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-08-31. Score: 2 | Accepted answer
  
  # So I ended up figuring out a solution:
  
  First, I tried manually editing the vix file as a text file, and inserting this [code](https://pastebin.pl/view/589f6c5e).
  [![Picture of code inserted in ev3g](https://i.sstatic.net/Ts4MN.png)](https://i.sstatic.net/Ts4MN.png)
  
  Opening this file would crash the software.  
  **However, if you didn't open it, it would work fine on the EV3 brick!**  
  From this, I concluded, that the problem is with the EV3 vix editor.  
  But identifying the problem wasn't enough, I needed to find a solution.
  
  After looking around the ev3 program files, I noticed that they use the exact same format as a vix file.  
  **Except this single line:**  
  Original:
  
  ```
  <VirtualInstrument IsTopLevel="false" IsReentrant="false" Version="1.0.2.0" xmlns="http://www.ni.com/VirtualInstrument.xsd">
  
  ```
  
  Changed:
  
  ```
  <VirtualInstrument IsTopLevel="false" IsReentrant="false" Version="1.0.2.0" OverridingModelDefinitionType="X3VIDocument" xmlns="http://www.ni.com/VirtualInstrument.xsd">
  
  ```
  
  Now, you can change this single line in your vix file, and the ev3g software will open it in the default editor. You can drag blocks, and also use the vix elements.  
  One disadvantage is that for some reason the vix terminals are invisible. But you can still select them, if you know where they are.
  
  If you have any more questions, ask them in a comment, and I will answer.
  
  > **Comments:**
  > **username_1**: Seeing that the question has remained unanswered for a month, I'd say there is definitely a knowledge gap which you are now best positioned to solve for the sake of people browsing this site in the future :)  
  > **username_0**: Should I keep the answer this way, or change it into instructions?  
  > **username_1**: I like this answer as it is, even though I can't readily see the relevance of the long code block in the beginning. The crux seems to be in the `OverridingModelDefinitionType="X3VIDocument"` part of the changed line, which should be understandable to anyone who could realistically be faced with this problem. So thanks for a great answer, you made quite an impressive entrance!  
  
  ---
  
  