|
POST
|
You'll have to loop through the segment collection of each feature's geometry. Use TypeOf (VB.NET) or Is (C#) to see if a segment implements one of the interfaces associated with curves (i.e. ICircularArc, IEllipticArc, etc). Unless they've added some new types recently, pretty much anything that isn't a Line is a curve of some type. So, you could just test the segment to see if it isn't ILine.
... View more
01-13-2014
06:34 AM
|
0
|
0
|
1871
|
|
POST
|
It looks to me that your problem is that you're using the same element instance over and over inside your loop. You need to create a new element with each loop iteration.
... View more
12-20-2013
04:17 AM
|
0
|
0
|
463
|
|
POST
|
If you want to alter the alias in the data source itself, then use IClassSchemaEdit.AlterFieldAliasName. If you only want to change it for the map document then use IFieldInfo.
... View more
12-20-2013
04:15 AM
|
0
|
0
|
541
|
|
POST
|
Actually, that's not the code you found there at all. The code at that link is this: Do While fc <> ""
Console.WriteLine(fc)
fc = fcs.Next()
Loop
You've modified that code to append the feature class name to the variable fc with each loop iteration. This is why fc will never be an empty string and why you a running into an infinite loop. The code at that link works because it assigns the feature class name to the variable fc instead of appending it. When fcs.Next() returns an empty string, fc will be assigned an empty string and the loop will terminate.
... View more
12-20-2013
04:10 AM
|
0
|
0
|
653
|
|
POST
|
I have an Addin button (called Analyze) that processes some data, then calls a modeless form. I want the button to be disabled until the user closes the form, or else it will be possible for the user to accidentially have multiple instances of the form open at the same time. To disable the button I use Me.Enabled = False in the button's OnClick event. What I can't figure out is how to reference the button from within the form. I was planning on changing the button's Enabled attribute back to True in the form's FormClosing event, unless someone knows of a better way. Any Ideas? Without seeing you actual code I can only offer a possible solution. We do this all the time, one of our commands opens a modeless dialog and we keep the command button checked for as long as the dialog is open. To do this, we create a form level variable for the dialog. In the OnClick event, we create the instance of the dialog and open it. In the Checked event, we check the visibility of the form and return the value accordingly. Here's the form variable declaration: Private m_form As yourFormClass Here's the code in OnClick: Public Sub OnClick() Implements ESRI.ArcGIS.SystemUI.ICommand.OnClick If m_form IsNot Nothing AndAlso m_form.Visible Then Return m_form = New yourFormClass() m_form.Show() End Sub Here's the code in Checked: Public ReadOnly Property Checked As Boolean Implements ESRI.ArcGIS.SystemUI.ICommand.Checked Get Return (m_form IsNot Nothing AndAlso m_form.Visible) End Get End Property
... View more
12-19-2013
10:30 AM
|
0
|
0
|
1007
|
|
POST
|
Your loop condition is to loop while fc is not an empty string. You're setting the value of fc inside the loop to an actual value, so it will never be an empty string. This results in an infinite loop because your loop condition will always be true. The only exception is when no feature class names are returned at all, in which case fc is an empty string to start with. In this case, you get the empty string. In the case of the infinite loop, you get the hang.
... View more
12-19-2013
10:19 AM
|
0
|
0
|
653
|
|
POST
|
Yes, you can edit any version for which you have permissions to make edits. This line here determines which version you are connecting to: WrkSpc = WrkSpcFact.OpenFromFile("\\MyConnection.sde", 0); You should specify the version you want to connect to when creating the *.sde file (or in the property set if you want to connect using the Open method).
... View more
12-16-2013
04:53 AM
|
0
|
0
|
451
|
|
POST
|
Hello, I am currently working on porting a stand-alone application using ArcObjects (a port from old VB6 code). Currently the application is using a GxDialog to select files from the file system. It looks like the GxDialog won't function if it's not used while inside of ArcMap or ArcCatalog. Is there something else that I could use that would allow for me to have a similar level of filter over the types of datasets the user would be looking for? For example shapefile, geodatabase feature class, table, etc. I had thought of using the Windows Forms open file dialog, but that won't allow me to get file geodatabase feature classes. Does anyone know of anything I can use? - Derrick The GxDialog works just fine in stand-alone applications but you must check out a Desktop license in order to use it (which also means that ArcGIS Desktop must be installed on the machine). If you are building your application using only ArcGIS Engine components then you can use the built-in Add Data tool.
... View more
12-16-2013
04:49 AM
|
0
|
0
|
538
|
|
POST
|
So I'm guessing that your console app passes some set of parameters to methods on your extension? If you want to debug that code with those inputs then add a test project to your solution and set up a unit test that calls the method with those inputs.
... View more
12-11-2013
12:19 PM
|
0
|
0
|
682
|
|
POST
|
Instead of using FaceId have you tried using the command's bitmap directly? ICommandItem.Command.Bitmap. Also, most if not all of the bitmaps used by ArcMap are imbedded in the arcmap.exe file. You can open this file in Visual Studio and export out the bitmap you want.
... View more
12-11-2013
09:30 AM
|
0
|
0
|
675
|
|
POST
|
The only reason that I can think of that the call to CreateProjectedCoordinateSystem would fail is if you passed in an invalid constant value. Try hardcoding the values - NAD83 UTM Zone 11 is 26911 and Zone 12 is 26912. Is this code running inside of ArcMap or is it a standalone app?
... View more
12-09-2013
10:00 AM
|
0
|
0
|
945
|
|
POST
|
Not sure if this is the problem but you're specifying NAD83 UTM zones. Would it make more sense to specify WGS84 UTM zones instead? I would still think it would know which transformation to use but I pretty much work with WGS84 data exclusively so I can't say for certain. I'm also not familiar with VS Express but if you can't set a breakpoint and step through the code then you can put in message boxes (or write to the output window) to see exactly where the code is failing. Also, putting in some error handling to give you the exception message might also help. It's usually just a general COM exception but you never know.
... View more
12-09-2013
09:41 AM
|
0
|
0
|
945
|
|
POST
|
You shouldn't need to provide the transformation for those coordinate systems. I'm not familiar with the file format you're getting your points from, but have to checked to see if the points already have a spatial reference? The coordinates may be in WGS84, but unless the spatial reference property is set to WGS84, the Project method will not know that's the coordinates system. You may need to create the WGS84 spatial reference and use it to set the SpatialReference property of the point before calling Project.
... View more
12-09-2013
09:18 AM
|
0
|
0
|
945
|
|
POST
|
There's nothing inherently wrong with that particular line. When you set a breakpoint and step through with the debugger is this the line that throws the exception? One thing I see is that you're using this spatial reference in the call to Project. This method will fail if the geometry you're calling it on does not already have a spatial reference or no transformation exists between it's spatial reference and the spatial reference you're projecting. Unless you can guarantee the geometry already has a valid spatial reference then you should be validating it before calling Project.
... View more
12-09-2013
08:56 AM
|
0
|
0
|
945
|
|
POST
|
All polygon geometries implement IPointCollection which can be used to get each vertex of the geometry. If the geometry is a true rectangle it will implement IEnvelope which has properties each of the points.
... View more
12-09-2013
08:16 AM
|
0
|
0
|
593
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2014 05:29 AM | |
| 1 | 02-01-2011 04:18 AM | |
| 1 | 02-04-2011 04:15 AM | |
| 1 | 01-17-2014 03:57 AM | |
| 1 | 10-07-2010 07:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|