Hi everyone!
My teacher gave me an individual assignment. Imagine that you have multiple dataframes (databases). Each of them stores several line layers, which store many lines of different lengths.
He told me to develop a C# tool that would find in each of the dataframes (let's say we had three dataframes) the maximum line in length (in the form of a message), and then display the minimum line from these three maximum lines. That is, I must rely on the parameter SHAPE_Length in the table.
I don't know how to succeed in this. I have a number of questions and I would be very grateful if you could help me!
1. Can I connect to the database using TextBox? For example something like this:
dbconnect.OpenWorkspace("" + TextBox1.ToString());
Sorry, I'm really bad at this.
2. With this code, I can only connect to one attribute table with lines:
IFeatureClass pFeatureClass = dbconnect.OpenFeatureClass("my_lines");
What if I have several line layers in my database? And it is required to turn to each, and among several to find one maximum line. It is a pity that there is no GENERAL attribute table that contains data from all layers. Is it possible to do without this line of code at all? Is there a method to find line layers in my database?
3. How to find the maximum line using a query. I have tried almost everything. For example:
pQueryfilter.WhereClause = "SHAPE_Length" "=MAX";
But it doesn't work:(
4. The results of my queries from each dataframe should be written to variables. Then they are compared and the minimum line among them is found. How to implement it?
Sorry for the huge number of questions. I'm attaching a screenshot of the tool below.
Hello!
Which Esri developer tool/SDK are you using? If you let us know we can move this post to a more appropriate Question board.
Thanks!