Hi, I'm trying to make a solution in visual studio called "select all schedule views and export them". Originate a button and a panel in revit, so that when pressed it appears a check list box to select the schedules views. I am trying to select all the schedules through a CHECK LIST BOX. First I used a filtered element collector to select all the schedules, then I tried the checklistbox.add method,and checked list box.data source but nothing appears when I start the method and open revit. Has anyone worked with chekc list box as a revit button? how does check list box works to select items?
using Form = System.Windows.Forms.Form;
using Application = Autodesk.Revit.ApplicationServices.Application;
public partial class Formulario_Schedules_Export : Form
private Document doc;
private UIApplication uiapp;
private UIDocument uidoc = null;
private IEnumerable<ViewSchedule> col;
private string _export_folder_name;
private string _ext;
private ViewScheduleExportOptions opt;
private UIApplication Application;
public Formulario_Schedules_Export(UIDocument uIDocument)
//pasar parametro de entrada
private void button1_Click(object sender, EventArgs e)
private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
Document doc = uidoc.Document;
List<ViewSchedule> sched_list = new List<ViewSchedule>(new FilteredElementCollector(doc).OfClass(typeof(ViewSchedule)).Cast<ViewSchedule>();
checkedListBox1.DataSource = sched_list;
checkedListBox1.DisplayMember = "Name";
Lately i have stumbled upon a Library called mXparser which i think can be useful for your cause.It gives you a lot of flexibility, such as variables, functions, constants, operators.You can check it out.
I'm using the 2015 version of visual studio C#.
I was told that the 2017 version was not stable in places but there are some nice features I'd like to use in the 2017 version.
Does anyone know of a any recent releases of visual studio. Hopefully the next release is more stable.
This What's new in Visual Studio 2019 - Visual Studio[^] shows the difference between the 15, 17 and 19. I didn't like 15 as it was wacky, 17 was a better one, as it is more integrated with Azure and added Angular stuff. If you have access to the 2019 version, then yeah 19 for sure.
I have been using VS 2017 for the past two years. Never experienced any issues. The updates were frequent and things were dine nicely. Just a week ago, I installed VS 2019. Certain things like cloud development are easier in VS 2019. As backup, I keep pervious version. So, I uninstalled VS 2015.
I am using a laptop that I purchased in 2012 with intel core i5 16 GB Ram and have not experienced any issues with VS 2019 with respect to memory or disk. I think what you are building within the Visual Studio could cause issues, but not necessarily by IDE.
I have 3 Network adapaters. I neeed the IP address of the primary, so I'm using this:
foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
if (ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)
if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
The question is, does NetworkInterface.GetAllNetworkInterfaces() return them in the correct order? How do you know which is the primary?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
That doesn't make sense as there's no such thing as a "primary" network adapter.
You can have a machine connected to multiple networks on multiple adapters. Which one is "primary" depends on which network subnet you arbitrarily consider "primary", and which adapater handles that subnet in the routing table.
The routing table also changes when network status changes, such as when you connect a VPN, or pop a laptop in/out of a dock and switch between wireless and wired networks.
That doesn't make sense either as the only thing that gets and holds the IP address would be the adapter itself, not the device or code running on it.
The application on the device just says "send this data to this host". It's up to the network stack running on the device to figure out how to do that and which network adapter to use, based on the routing table. Once that is determined, it tells the adapter driver to send the data to the target host.
A single machine (or device) can have multiple IP addresses. The assignment of IP addresses stops at the network adapter. The device the adapters are "plugged into" never gets an address.
I am not a C# programer but the "primary" network interface in the Microsoft Windows operating system is determined by the route metric.
If your question is: What is the primary adapter in Microsoft Windows?
Then the answer is: It's the network card that contains the route with the lowest metric. This applies to both ipv4 and ipv6.
Note: This does not mean the network interface is able to route traffic for all subnets... that would depend on the routing table which may be dynamic. The primary adapter is probably meaningless for your needs.
I used various code combinations for web page reading, but i have this error:
[The remote server returned an error: (403) Forbidden]
- I use VS2010. It's because my version of VS is so old, i keep getting this error?
- Is the same problem for newer versions of VS?
- If newer versions have no problem, what can i add to my version?
- Or if it's the code problem, what is the correct code?
This problem appear for SOME websites. But not on all.