POST
|
To un-register a dll or ocx file : Click Start > Run >Type regsvr32 <path & filename of dll or ocx> /u Click Enter. http://www.winvistaclub.com/e43.html Make sure you run command prompt in Admin mode. Also, when you're building your solution, make sure it's in 32bit mode. This might also be an issue as to why you are having difficulties unregistering the program.
... View more
10-18-2010
05:57 AM
|
0
|
0
|
308
|
POST
|
use an elseif statement after your original if statement (the one that checks if pLayer is a ifeaturelayer) and check if pLayer is a ICompositeLayer. if it is a composite layer then do another for loop and loop through the Composite layer and find the layer you're looking for.
... View more
06-23-2010
08:19 PM
|
0
|
0
|
526
|
POST
|
Thanks for the help guys. The method I tried worked for a standalone application I used before. I set a windows form button's click event to be the selection tool. Worked fine. Guess it's not the same with ArcMap. Thanks again guys!
... View more
06-17-2010
02:10 PM
|
0
|
0
|
648
|
POST
|
Hi All, The code belows is the OnClick procedure for one of the custom tools I'm making. The problem is, when the initial tool is activated, I want it to check if the appropriate features are selected. If it isn't selected, I want the Select Features tool in ArcMap to activate so the user can select the specific feature. I get an error "m_application.CurrentTool = pCommand". If anyone has an advice for me, that'd be greatly appreciated. Thanks Public Overrides Sub OnClick()
Try
'TODO: Add ClipTool.OnClick implementation
Dim pMap As IMxDocument = GetMxDocumentFromArcMap(m_application)
Dim pFeatLayer As IFeatureLayer = pMap.SelectedLayer
Dim pFeatSelection As IFeatureSelection = pFeatLayer
Dim pSelSet As ISelectionSet
pSelSet = pFeatSelection.SelectionSet
If pSelSet.Count = 0 Then
MsgBox("Please make a selection")
Dim pCommand As ICommand
pCommand = New ControlsSelectFeaturesToolClass ' The selectfeatures tool
pCommand.OnCreate(m_application)
If pCommand.Enabled = True Then
m_application.CurrentTool = pCommand
End If
Exit Sub
End If
Call CreateWindow(GetMxDocumentFromArcMap(m_application))
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
... View more
06-15-2010
12:33 PM
|
0
|
4
|
3849
|
POST
|
It is quite simple, I have a polygon and a polyline passing through it and I want to split the polygon with this polyline Check this out: http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeometry/ITopologicalOperator_Cut.htm
... View more
06-14-2010
09:59 PM
|
0
|
0
|
487
|
POST
|
Hey Deme, Yeah, so the parsing still stands. Unless you know the naming convention of the tables. Let's say there are 6 tables all together. And the naming convention goes Table1, Table2, Table3 and so on... You can simply count the number of tables and name the table based on that count. But if the naming convention is not certain, then you have to parse the table name and get the number value out of it. This will essentially be a loop that checks each table name. Assign the numeric value to a variable each time the loop runs. Then have an if statement that reassigns the variable to the numeric value if the new one value (of the tablename being tested) is larger than the old value. Use regular expressions (if you're using .NET) to do the parsing. Hopefully I understood your problem a little better (lol probably not though!)
... View more
06-14-2010
07:00 AM
|
0
|
0
|
249
|
POST
|
i want to install Arcgis SDK for .NET . i searched the internet but i couldnt find a download link Just to elaborate on Offermann's post a little further. The SDK is included in your copy of ArcGIS. It's part of the add-ons that won't install unless you specify. So simply pop in your disc of ArcGIS 9+ and select the option to install the .NET SDK. Should only take a few minutes. Best of luck!
... View more
06-14-2010
06:18 AM
|
0
|
0
|
448
|
POST
|
I'm actually working on this same tool. I've developed something like this before. You essentially have to get the envelope of the polygon and apply the split using the topo operator to a copy of the polygon. How do you plan to split the polygon? Equal parts? based on proportions? what shape is the polygon? You must determine all of these factors (and more) before attempting this procedure.
... View more
06-14-2010
06:15 AM
|
0
|
0
|
487
|
POST
|
Try this out. It's a basic for loop that goes through your mapcontrol and deletes the layer if the match condition is met. It worked for me when I tested it. if it doesn't work. Try casting AxMapControl1 to the IMap interface. Best of luck! For i = 0 To AxMapControl1.ActiveView.FocusMap.LayerCount
If AxMapControl1.ActiveView.FocusMap.Layer(i).Name = "Name of Your Layer from listbox or combobox" Then
AxMapControl1.ActiveView.FocusMap.DeleteLayer(AxMapControl1.ActiveView.FocusMap.Layer(i))
End If
Next
... View more
06-13-2010
09:33 PM
|
0
|
0
|
221
|
POST
|
I know, VBA is history, but some of use are still using it on 9.2. My question is: how do you load an SDE annotation layer using VBA code? We're now using SDE 9 and the way SDE stores annotation appears to be different than when we were using older version of SDE. My old code, that worked prior to going to SDE 9n was as follows: Set pFeatureClass = pFeatureWorkspace.OpenFeatureClass("CALGIS.CNTST_LANDUSE_1P2007_LL") Set pFeatureLayer = New CoverageAnnotationLayer pFeatureLayer.Name = "Landuse Annotation Leadlines - 1P2007" 'set Layername pFeatureLayer.MinimumScale = 4000 pFeatureLayer.ShowTips = True pMap.AddLayer pFeatureLayer 'Add Layer to Map pMxDoc.ActiveView.ContentsChanged I get and error message indicating that an "Object Variable or With Block not set", how would I change the code to work with the new SDE annotation? What ArcObject should I now be using? Try setting the DataSourceType of the FeatureLayer Also see: IFeatureLayer
pFeatureLayer.DataSourceType = "SDE Feature Class"
... View more
06-12-2010
07:39 AM
|
0
|
0
|
154
|
POST
|
I think you'd have to parse the name and get the numeric value out of it. Then do that numeric value + 1. IDatasetName interface should offer some options for you!
... View more
06-12-2010
07:25 AM
|
0
|
0
|
249
|
POST
|
Thanks for your responses Alexander and Neil. I went did the showdialog option last night and got it to work. It actually seems a lot more practical. I only have one non-modal form form and there is no user input so, it doesn't need to be tabbed. Thanks again guys!
... View more
06-10-2010
10:48 AM
|
0
|
0
|
323
|
POST
|
Hi All, Just curious to see if anyone else has run into this problem. I've created many forms with many textboxes and other controls which deploy perfectly in ArcMap (using VB.NET). However, it won't let me tab through the controls on any particular form. Is this some kind of bug in ArcMap with .NET or is it just me? My other forms (Developed in VBA) Tab perfectly, but the issue seems to lie with the ones created in .NET. Any info on this would be helpful. Thanks
... View more
06-09-2010
10:17 PM
|
0
|
3
|
1730
|
POST
|
Hi All, Creating a polygon split tool. The code below is incomplete but I've hit a snag. How would I extend the polylines I've created below by a given length? I want to use these polylines to cut the polygon which I'm defining using the User provided points. Any help would be appreciated. Thanks Public Sub ClipTool(ByVal p0X As Double, ByVal p0Y As Double, ByVal p1X As Double, _
ByVal p1Y As Double, ByVal p2X As Double, ByVal p2Y As Double, _
ByVal p3X As Double, ByVal p3Y As Double)
' 1. Create 4 points from teh coordinates input
Dim pPoint0 As IPoint = New Point
Dim pPoint1 As IPoint = New Point
Dim pPoint2 As IPoint = New Point
Dim pPoint3 As IPoint = New Point
pPoint0.X = p0X
pPoint0.Y = p0Y
pPoint1.X = p1X
pPoint1.Y = p1Y
pPoint2.X = p2X
pPoint2.Y = p2Y
pPoint3.X = p3X
pPoint3.Y = p3Y
Dim pPointCollection As IPointCollection
pPointCollection.AddPoint(pPoint0)
pPointCollection.AddPoint(pPoint1)
pPointCollection.AddPoint(pPoint2)
pPointCollection.AddPoint(pPoint3)
' 2. Create 4 polylines representing the outline of the lot from the 4 points
Dim pPLine0 As IPolyline = New Polyline
Dim pPLine1 As IPolyline = New Polyline
Dim pPLine2 As IPolyline = New Polyline
Dim pPLine3 As IPolyline = New Polyline
pPLine0.FromPoint = pPoint0
pPLine0.ToPoint = pPoint1
pPLine1.FromPoint = pPoint1
pPLine1.ToPoint = pPoint2
pPLine2.FromPoint = pPoint2
pPLine2.ToPoint = pPoint3
pPLine3.FromPoint = pPoint3
pPLine3.ToPoint = pPLine0
' 3. Locate the point halfway along the top and bottom polylines
' This is done using the ratio (in this case. 0.5)
Dim TopMidPoint As IPoint = New Point
Dim BotMidPoint As IPoint = New Point
pPLine0.QueryPoint(esriSegmentExtension.esriNoExtension, 0.5, True, TopMidPoint)
pPLine2.QueryPoint(esriSegmentExtension.esriNoExtension, 0.5, True, BotMidPoint)
' 4. Locate the points 1/4, 1/2, and 3/4 along each side polyline.
' This is done using the ratio (in this case 0.25, 0.50, 0.75).
Dim Right25Point As IPoint = New Point
Dim Right50Point As IPoint = New Point
Dim Right75Point As IPoint = New Point
Dim Left25Point As IPoint = New Point
Dim Left50Point As IPoint = New Point
Dim Left75Point As IPoint = New Point
pPLine1.QueryPoint(esriSegmentExtension.esriNoExtension, 0.25, True, Right25Point)
pPLine1.QueryPoint(esriSegmentExtension.esriNoExtension, 0.5, True, Right50Point)
pPLine1.QueryPoint(esriSegmentExtension.esriNoExtension, 0.75, True, Right75Point)
pPLine3.QueryPoint(esriSegmentExtension.esriNoExtension, 0.25, True, Left25Point)
pPLine3.QueryPoint(esriSegmentExtension.esriNoExtension, 0.5, True, Left50Point)
pPLine3.QueryPoint(esriSegmentExtension.esriNoExtension, 0.75, True, Left75Point)
' 5. Create a polyline from the points in step 3 cutting the geometry in half.
' Also create 3 polylines from teh points in 4 for cutting the geometry in quarters.
Dim pLineCutTopBot As IPolyline = New Polyline
Dim pLine25Cut As IPolyline = New Polyline
Dim pLine50Cut As IPolyline = New Polyline
Dim pLine75Cut As IPolyline = New Polyline
pLine25Cut.FromPoint = Right25Point
pLine25Cut.ToPoint = Left25Point
pLine50Cut.FromPoint = Right50Point
pLine50Cut.ToPoint = Left50Point
pLine75Cut.FromPoint = Right75Point
pLine75Cut.ToPoint = Left75Point
End Sub
... View more
06-09-2010
03:27 PM
|
0
|
0
|
528
|
Title | Kudos | Posted |
---|---|---|
1 | 08-30-2013 09:41 AM | |
4 | 01-09-2018 12:33 PM | |
2 | 10-06-2014 03:14 PM | |
2 | 08-13-2015 09:45 AM | |
1 | 08-14-2015 08:51 AM |
Online Status |
Offline
|
Date Last Visited |
08-12-2023
04:34 AM
|