Message 1 of 3
Not applicable
09-26-2018
10:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I am creating an add in to batch insert Revit links to models.
The first task is to add selected models path to listbox1 as following image:
and following is my Code:
private void bt_AddModel_MouseClick(object sender, MouseEventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
if (openFileDialog1.ShowDialog()==DialogResult.OK)
{
string[] files = openFileDialog1.FileNames;
foreach(string s in files)
{
listBox1.Items.Add(s);
}
}
}But the problem is, after selecting all the files and click OK, the Winform add in close as well instead of add the files list into listbox.
If anyone have experience in this, please help me.
Thank you so much for your help :).
Best Regards,
Cherry Truong
Solved! Go to Solution.