Hello everyone,
I am using vb.net arcmap 10.2.2 add-in.
I developed a function to allow user open a csv file from local and other functions on the opened csv file. But when I click "Cancel" on the dialog or just close the dialog, the arcmap just crash.
I want to check what cause the issue?
The code isas follows:
<SPAN class="typ" style="color: #2b91af;"><CODE><SPAN class="typ" style="color: #2b91af;"> Dim</SPAN><SPAN class="pln" style="color: #000000;"> openFileDialog1 </SPAN><SPAN class="typ" style="color: #2b91af;">As</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="typ" style="color: #2b91af;">New</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="typ" style="color: #2b91af;">OpenFileDialog</SPAN><SPAN class="pln" style="color: #000000;">
</SPAN><SPAN class="typ" style="color: #2b91af;">Dim</SPAN><SPAN class="pln" style="color: #000000;"> fileName </SPAN><SPAN class="typ" style="color: #2b91af;">As</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="typ" style="color: #2b91af;">String</SPAN><SPAN class="pln" style="color: #000000;">
openFileDialog1</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">Filter</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"Comma delimited|*.csv"</SPAN><SPAN class="pln" style="color: #000000;">
openFileDialog1</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">Title</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">"Open a csv File"</SPAN><SPAN class="pln" style="color: #000000;">
openFileDialog1</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">ShowDialog</SPAN><SPAN class="pun" style="color: #145680;">()</SPAN><SPAN class="pln" style="color: #000000;">
fileName </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> openFileDialog1</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">FileName</SPAN>
Can please tell me the error is caused by my code or arcmap issue? Thanks a lot.