POST
|
Hey Leo, Thanks, that did it!!! From there i was able to get what I needed to center the form!!! Thanks again, Kevin Orcutt
... View more
02-20-2013
04:43 AM
|
0
|
0
|
401
|
POST
|
Hello Leo, getting there, but not quite, sorry. I figured that I would have to do something along those lines, but getting the application height and width among other things are escaping my grasp... The KEY thing that I'm trying to get is the application's location on the desktop. That way I can place the form over it when it comes up. As mentioned, this is particular to when ArcMap is on the second monitor or beyond. I want the form to appear over ArcMap, not back on the first monitor. So the location is Key... Any other ideas??? Kevin O.
... View more
02-19-2013
12:33 PM
|
0
|
0
|
401
|
POST
|
Hello All, I'm sure this one's been covered, but for the life of me, i can't find a solution in either the forum or the docs :confused: ... I'm building an Add-In in Visual BASIC for a Desktop environment (Arcmap 10.1). I have a simple tool that the user selects a feature, and then I want a simple form to come up to show some attributes and other things... This is not a dockable window or anything like that, just a simple form... I am trying to bring up a custom form after the user "Uses/clicks" my Add-In tool... I can presenty get the form to come up, that's NO problem... It's the location of that form that's causing me grief :mad:. I am trying to center the form on the ArcMap application window... NO GO! I can't figure out a way of getting the form to come up over/centered on the ArcMap application. This is particularly important when the user has multiple monitors and has ArcMap on the second or beyond monitor... Is there a way of getting the desktop (Windows Desktop) location of the running ArcMap application and using that to locate said form??? I'm pretty sure this should be an easy one to solve,, just pulling my hair out trying to figure out! 😞 I'm figuring I should start with My.ArcMap.( something goes here :)) Thanks in Advance, Slightly Frustrated, Kevin Orcutt
... View more
02-19-2013
11:44 AM
|
0
|
7
|
872
|
POST
|
Yes, there is an "OnClick" sub for a tool. if you use the ArcGIS|Extending ArcObjects|Base Tool template, there will be a provided "OnClick" sub for you to fill out with all of your appropriate code. Hope this helps, Kevin Orcutt GIS Developer/Consultant City of Cincinnati - Cincinnati Area GIS (CAGIS) (513) 850-1335 (cell) Kevin.Orcutt@cincinnati-oh.gov www.cagis.org
... View more
09-07-2012
12:28 PM
|
0
|
0
|
218
|
POST
|
This might be overkill, but here is a quick snapshot with slight modifications of some code that I use to get a centroid of a polygon feature... Private Function GetPolygonFeatureCentroid(ByVal PolygonFeatureLayer As IFeatureLayer) as IPoint
Dim PolygonFeatureClass As IFeatureClass
PolygonFeatureClass = PolygonFeatureLayer.FeatureClass
Dim PolygonFeatureSelection As IFeatureSelection = PolygonFeatureLayer
Dim PolygonFeatureSelectionSet As ISelectionSet = PolygonFeatureSelection.SelectionSet
Dim PolygonFeatureCursor As IFeatureCursor
Dim newPolygonFeature As IFeature
Dim newPolygonArea As IArea
Dim newPolygonFeatureCentroid As IPoint
Dim queryFilter As IQueryFilter = New QueryFilterClass()
'ToDo: Setup the where clause here to select the feature that you want... or skip altogether if you already have that feature!
PolygonFeatureFSelectionSet = PolygonFeatureClass.Select(queryFilter, esriSelectionType.esriSelectionTypeSnapshot, esriSelectionOption.esriSelectionOptionNormal, Nothing)
PolygonFeatureCursor = PolygonFeatureClass.Search(queryFilter, False)
If PolygonFeatureFSelectionSet.Count > 0 Then
newPolygonFeature = PolygonFeatureFCursor.NextFeature
newPolygonArea = newPolygonFeature.ShapeCopy
newPolygonFeatureCentroid = TryCast(newPolygonArea.Centroid, IPoint)
End If
Return newPolygonFeatureCentroid
End Function I left out the specific where clause for the query filter used, I figured that you would have that already, or already have the particular feature that you want the centroid of... Hope this helps. Kevin Orcutt GIS Developer/Consultant City of Cincinnati - Cincinnati Area GIS (CAGIS) (513) 850-1335 (cell) Kevin.Orcutt@cincinnati-oh.gov www.cagis.org
... View more
09-07-2012
11:49 AM
|
0
|
0
|
1164
|
POST
|
Howdy All, I'm trying to find the GUID or the command name (i.e. "esriEditorExt.ConstructCommand" ) for the topology Split Polygons command. The icon for the command is: [ATTACH=CONFIG]16219[/ATTACH] I'm trying to use this command inside an vb.net project that is a command added to an extension that I've created... Any Ideas??? I've looked through the arcmap commands listing, but i didn't see anything that might match. Thanks in advance, Kevin Orcutt GIS Developer/Consultant City of Cincinnati - Cincinnati Area GIS (CAGIS) (513) 850-1335 (cell) Kevin.Orcutt@cincinnati-oh.gov www.cagis.org
... View more
07-18-2012
02:00 PM
|
0
|
2
|
516
|
POST
|
Howdy All, I'm running into a problem with the ITopologicalOperator.Intersect function. I am working with two features from the same geodatabase that are polylines. I am trying to find the point at which the two line intersect. I happen to know that the intersect by visually inspecting the corner. I'm sure there's some test that I should do before trying the Intersect function. I am getting a "COMException was unhandled by user code" error on the line I call the Intersect function. Here is the code, including the calling line to my function:
'Calling line here...
PointResult = GetIntersectionPoint(CenterlineToSplitFeature.ShapeCopy, IntersectingFeature.ShapeCopy)
'Function code here...
Function GetIntersectionPoint(Line1 As IGeometry, Line2 As IGeometry) As IPoint
Dim pGeom As IGeometry
Dim pTopo As ITopologicalOperator
pTopo = Line1
'Here's the line in which I get the error...
pGeom = pTopo.Intersect(Line2, esriGeometryDimension.esriGeometryNoDimension)
Dim ppoints As IPointCollection
Dim ppoint As IPoint
ppoints = pGeom
If ppoints.PointCount > 0 Then
ppoint = ppoints.Point(0)
Return ppoint
Else
Return Nothing
End If
End Function
The particular ErrorCode I get is: -2147220971 Any clues as to what I'm doing wrong, or better yet as to how I might fix this... More particulars: VB .Net - Visual Studio 2010 ArcMap 10.x, sp 4 Windows 7 - 32-bit Here's a snapshot of the actual intesection: The lines dDO intersect, but not at any vertice on either line. Also both line do have "arc"/curve sections in themselves, if that has anything to do with it... [ATTACH=CONFIG]13182[/ATTACH] Thanks in advance, Kevin Orcutt GIS Developer/Consultant City of Cincinnati - Cincinnati Area GIS (CAGIS) (513) 850-1335 (cell) Kevin.Orcutt@cincinnati-oh.gov www.cagis.org
... View more
04-02-2012
07:24 AM
|
0
|
1
|
521
|
POST
|
Howdy All, I'm using ArcGIS 10 and Visio 2003. I'm trying to create a Geodatabase poster. I found the updated version of the ArcGIS Diagrammer for ArcGIS 10. However, I think I'm missing something in the use of it... I was looking at the website: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Documenting_your_geodatabase_design/003n00000012000000/ and towards the end of that page it mentioned using the Diagrammer found out on the arcscripts site to create these type of diagrams... I've snapped a picture from that site to give an example of what i'm trying to create: [ATTACH=CONFIG]11819[/ATTACH] and the second picture is a thumbnail version of an overall poster that we're after...[ATTACH=CONFIG]11820[/ATTACH] From what I can tell, the Diagrammer tool for ArcGIS 10 is NOT the same tool as the older versions. in as it does NOT create these types of diagrams, it creates something new. I also did NOT find any sort of template/stencil for Visio in the installed folders. I DID find two templates/stencils for Visio in an older version for ArcGIS 9.x The two templates are: GeodatabaseDiagrammerPS and GeodatabaseDiagrammerTT .vss and .vst files. These templates/stencils appear to have SOME but NOT all of the various elements that make up a geodatabase. So my questions are: 1) Is there such a tool for ArcGIS 10 to create the older style of poster info using Visio or something that can go into Visio? 2) How much difficulty is there in getting the older diagrammer to work with ArcGIS 10? 3) Is there any sort of plans of bringing the older visio templates/stencils into the newer Diagrammer tool? 4) Is there any plans for updating these Templates/Stencils to include more element types in a Geodatabase, such as Topology, Layers and so on...? Hope this all makes sense! If not reply back and I'll try and straighten out. Thanks in advance, Kevin Orcutt GIS Developer/Consultant City of Cincinnati - Cincinnati Area GIS (CAGIS) (513) 850-1335 (cell) Kevin.Orcutt@cincinnati-oh.gov www.cagis.org
... View more
02-08-2012
01:00 PM
|
0
|
1
|
2916
|
POST
|
Ok, Do I need to set the spatial filter's geometry to something??? In most cases I'll have two or three street centerline features selected to use in the filter... Kevin
... View more
01-25-2012
08:30 AM
|
0
|
0
|
277
|
POST
|
Howdy All, I've progressed down my problems path to my next challenge... I have two feature layers that both have multiple features selected in them... One is street centerlines (polylines) and the other is a polygon layer, some of which intersect/cover the street centerline layer... I need to remove from the polygon selection those polygons that DO intersect/cover the street centerlines. There are multiple polygons in the original selection not all of which intersect the streets, and there are multiple street centerlines in the street centerline original selection. I need a programmatic solution to this, I can manually perform what I need by using the "Select by Location" tool and in there specify "remove from the currently selected features in" selection method... OK That's great, but I need to automate this via code... I think i need to use a Spatial Filter and use the "SelectFeatures" method in the polygon layer's Selection object... I just can't figure out how to setup the spatial filter to do this... My stumbling block is getting the multiple line geometries into the ONE geometry of the Spatial filter... And had to specify to subtract the features from the selection... maybe I'm going down the wrong path here... If so, please enlighten me as to the best path to travel!!! 🙂 I'm pretty sure this is an easy one, but I'm just having one of those days where my brain just isn't firing on all cylinders! Thanks in advance, Kevin Orcutt GIS Developer/Consultant City of Cincinnati - Cincinnati Area GIS (CAGIS) (513) 850-1335 (cell) Kevin.Orcutt@cincinnati-oh.gov www.cagis.org
... View more
01-25-2012
06:51 AM
|
0
|
3
|
516
|
POST
|
OK Alexander, I've followed most of what you've said. And I have progressed to the point where I need to "Split" the polygon with the selected lines... per your quote: The get all the geometries of the line features, merge them together (union) and split the polygon feature (Ifeatureedit) How does one go about "Splitting" the polygon with this collection of line geometeries... I have'nt gotten the collection of geometeries yet, but i have a selectionset of the lines, so getting the geometries isn't too hard from what I got so far... Just NOT sure on the "Splitting" part.. Thanks again in advance, Kevin
... View more
01-24-2012
10:36 AM
|
0
|
0
|
211
|
POST
|
Howdy All, This one should be easy, but for the life of me I can't make heads or tails /sense out of it... I am trying to write the code for a button/command that the user will click after they've finshed a "Edit Sketch"... I want to take the sketch (which is a polygon in this case) and get to the feature that it created... I need to modify a couple of attributes, then run a "select by location" on it to get the underlining lines (from a different layer) that intersect it. then clear the selection on the "Polygon" layer and run a topology operation of "Split polygons" with the lines selected... Seems pretty simple when i go through the motions manually... but I can't seem to get ther from here with the code version... 🙂 I've been through the numerous webpages on the resource page under "Developing with ArcGIS - Learning ArcObjects - Editing Data" and under "Developing with ArcGIS - Learning ArcObjects - Extending ArcObjects - Editor Framework Customizations"... But It's not clear to me what I need to next... Basically there's a new feature in the polygon layer, that is also the current edit sketch, that I would like to manipulate as a feature via code... Can I get to the feature from the edit sketch, or do I have to do something else to get to the newly created feature??? then how difficult is it to do the "Select By Location" operation??? Any ideas will be greatly appreciated!!! Thanks in advance, Kevin Orcutt GIS Developer/Consultant City of Cincinnati - Cincinnati Area GIS (CAGIS) (513) 850-1335 (cell) Kevin.Orcutt@cincinnati-oh.gov www.cagis.org
... View more
01-24-2012
08:00 AM
|
0
|
3
|
526
|
POST
|
The ArcGIS10 zipper tool has been posted to the code gallery. See the ReadMe.txt file within the download for instructions. Zipper Tool Link Hey Sean, Downloaded the file, but there was NO "ReadMe.txt" in it... Any chance that the .Net solution could be posted instead of the final install package??? I'm code curious! Always wanting to look at code! 😄 Thanks in advance, Kevin Orcutt GIS Developer/Consultant City of Cincinnati â?? Cincinnati Area GIS (CAGIS) Kevin.Orcutt@cincinnati-oh.gov (513) 850-1335 (cell) www.cagis.org P.S. Total Side Note: Hey Tony and Carmen... How's Greenville going??? I grew up not too far from you, a little east right down HWY 29... in Taylor!!! Still have Family in the Greenville and Greer areas! Later!
... View more
01-13-2012
09:39 AM
|
0
|
0
|
446
|
POST
|
Howdy All, Here's one that way out there! :-)... Our organization has recently started to look at using the Task Assistant Manager (TAM), which is part of the "Production Mapping" extension, to help out some of our users (primarily the "Editors") with their day to day tasks. We have setup four or five different editing task workflows, depending on how the user is logged in as... We would like to be able to, after the user/editor logs in, load up the appropriate workflow... So, what I've found after a bit of research and a little teaser mention of a previously unknown set of API's... is this... On ESRI's "Task Assistant Manager FAQs" page:http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005t00000053000000.htm there is mention of implementing "ESRI.Apf.Apps.TaskAssistantSDK.ArcMap.ICommandParams"... Looking at the first part of it, youâ??ll notice: "ESRI.Apf.Apps.TaskAssistantSDK"... after digging through that SDK, I've found what looks to be promising "TaskAssistant" class which has all sorts of useful methods, such as "OpenWorkflow"... Sounds too good to be true!!! So anyways, I know that this SDK is most likely outside of normal ArcObjects domain, I was hoping that someone has ventured out here and knows some things about it... Namely, how does one access ArcMap's TaskAssistant Object??? I would love to create a little ArcMap Add-In that has the user login to the system and have it then populates the TAM with the correct workflow... If I could get access to ArcMap's TaskAssistant object, I think I should be able to come up with a solution that solves our needs... Please, if anyone knows anything about this SDK, give me some clues/hints as to how to go about my task. Thanks in advance, Kevin Orcutt GIS Developer/Consultant City of Cincinnati â?? Cincinnati Area GIS (CAGIS) Kevin.Orcutt@cincinnati-oh.gov (513) 850-1335 (cell) www.cagis.org
... View more
01-06-2012
06:08 AM
|
0
|
0
|
1982
|
POST
|
Howdy All, First off, Thank you for all of the great responses... Working through them all, I've come up with a pretty decent solution (It Works!!!)... Code to follow... Here is my class for the extension within the solution: Imports ESRI.ArcGIS.ArcMapUI
Imports ESRI.ArcGIS.Framework
Public Class CycleThrough
Inherits ESRI.ArcGIS.Desktop.AddIns.Extension
Public Sub New()
End Sub
Protected Overrides Sub OnStartup()
WireEvents()
End Sub
Protected Overrides Sub OnShutdown()
End Sub
Private Sub WireEvents()
Dim docEvents As IDocumentEvents_Event
Dim mapStatusEvents As IApplicationStatusEvents_Event
docEvents = TryCast(My.ArcMap.Application.Document, IDocumentEvents_Event)
AddHandler docEvents.NewDocument, AddressOf OnNewDocument
AddHandler docEvents.OpenDocument, AddressOf OnOpenDocument
If TypeOf My.ArcMap.Application.Document.Parent Is IMxApplication Then
mapStatusEvents = TryCast(My.ArcMap.Application.Document.Parent, IApplicationStatusEvents_Event)
AddHandler mapStatusEvents.Initialized, AddressOf OnInitialized
End If
End Sub
Private Sub OnNewDocument()
SetupContext()
End Sub
Private Sub OnOpenDocument()
SetupContext()
End Sub
Private Sub OnInitialized()
SetupContext()
End Sub
Private Sub SetupContext()
Dim contextMenuGUID As New UID
contextMenuGUID.Value = "{BF643199-9062-11D2-AE71-080009EC732A}"
Dim myContextMenu As ICommandBar = My.ArcMap.Application.Document.CommandBars.Find(contextMenuGUID, False, False)
If myContextMenu IsNot Nothing Then
Dim commandGUID As New UID
commandGUID.Value = "LayerCycle_CycleButton"
Dim myCommandItem As ICommandItem = myContextMenu.Find(commandGUID)
If myCommandItem Is Nothing Then
myCommandItem = myContextMenu.Add(commandGUID, 9) 'the 9 is where I happen to want the button to be, it could be nothing or any other value
myCommandItem.Refresh()
End If
End If
End Sub
End Class
Hey as a side note... I too could NOT find the appropiate UID for the context menu in the 10.0 Docs... I looked in the ArcObjects site: ArcObjects SDK 10 Microsoft .Net Framework - ArcMap Commands Hey Sean, you might want to mention to someone that that particular page might be missing some items that were in previous versions i.e. the 9.0 page, where Jeff was able to find it... So once again, Thank you All for the responses!!!:cool: :cool: Kevin Orcutt
... View more
12-16-2011
12:12 PM
|
0
|
0
|
526
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|