POST
|
Hi Sean, Thanks for the reply. With a regular edit operation you create or modify as many features you wish and still have one edit entry on the stack. The chained edit operation is used when you need the results of an edit to make further edits but still only want one entry on the stack. The example you typically see is creating a feature and adding an attachment in one operation. Understood. Events are limited. EditCompletedEvent fires after an operation. At that point the edit is done and you cant change it or combine with it. That was my assumption, thanks for confirming. Whats your workflow with ArcObjects and what are you trying to accomplish? Several of our current ArcMap extensions use BeforeStopOperation to see what type of operation is being done, and/or in which feature layer the feature resides, before sending some of the edited feature's attribute information off to functions that update non-spatial tables (basically recording edit history, sources, etc.) Sounds like there are two main options to accomplish this in Pro? 1) Write customized editing tools which create their own create/update/delete operations and utilize chaining. 2) Leverage the out-of-box editing tools by subscribing to the three row level events for each feature layer, and handle accordingly inside those events (likely all pointing to the same function).
... View more
05-16-2017
01:17 PM
|
0
|
1
|
881
|
POST
|
Using ArcPro SDK 2.0 beta I see in the Chain Edit Operations sample, we can roll multiple edit operations into one entry in the Undo stack by creating two custom operations. Is it possible to get the current edit operation from an out-of-box edit before chaining one or more custom operations to it?(Similar to how the BeforeStopOperation event in ArcObjects functions.)
... View more
05-16-2017
09:04 AM
|
0
|
3
|
1289
|
POST
|
You can use IObjectClassEvents: IObjectClassEvents Example Just change it to use IStandAloneTable and ITable instead of IFeatureClass: Private WithEvents ObjectClassEvents As ObjectClassEvents Public Sub initEvents() Dim pMxdoc As IMxDocument Set pMxdoc = Application.Document Dim satColl As IStandaloneTableCollection Set satColl = pMxdoc.FocusMap Dim sat As IStandaloneTable Set sat = satColl.StandaloneTable(0) Dim t As ITable Set t = sat.Table ' Dim pFeatureLayer As IFeatureLayer ' Dim pLayer As ILayer ' Dim pFeatureClass As IFeatureClass ' Set pLayer = pMxdoc.FocusMap.Layer(0) ' Set pFeatureLayer = pLayer ' Set pFeatureClass = pFeatureLayer.FeatureClass Dim pObjectClass As IObjectClass ' Set pObjectClass = pFeatureClass Set pObjectClass = t Set ObjectClassEvents = pObjectClass End Sub Private Sub ObjectClassEvents_OnChange(ByVal obj As IObject) MsgBox "OnChange for: " & obj.OID End Sub Private Sub ObjectClassEvents_OnCreate(ByVal obj As IObject) MsgBox "OnCreate for: " & obj.OID End Sub Private Sub ObjectClassEvents_OnDelete(ByVal obj As IObject) MsgBox "OnDelete for: " & obj.OID End Sub
... View more
06-28-2016
09:18 AM
|
2
|
0
|
193
|
POST
|
Sorry I didn't notice before you were creating a new LabelEngineLayerProperties object. You can get the current object by querying the AnnotateLayerPropertiesCollection. There should be no need to clear and re-add it: Dim alpColl As IAnnotateLayerPropertiesCollection Set alpColl = gfl.AnnotationProperties Dim alp As IAnnotateLayerProperties alpColl.QueryItem 0, alp, Nothing, Nothing 'query first anno class Dim leProp As IAnnotateLayerProperties Set leProp = alp 'New LabelEngineLayerProperties Dim lProp As ILabelEngineLayerProperties Set lProp = leProp
... View more
06-14-2016
08:33 AM
|
1
|
1
|
853
|
POST
|
Sorry I don't have time to test this; usually you'll need to set the updates back to the original object at the end. Something like: fl.AnnotationProperties = pAnno;
... View more
06-10-2016
09:15 AM
|
0
|
3
|
853
|
POST
|
Hi Shannon- Please see Darren's illustration, it is better than what I could hope to explain using words alone. Now imagine extruding that ring all along the stream into an irregular cylinder - the intersection of this cylinder with the surface would create your 'effective' buffer line. (Not a perfect line, as Darren points out.) Dan and Darren's suggestion of path distance may be better depending on your data. The resolution of the surface being used would factor in (i.e. a super wide path will give you a distance, but that is only valid somewhere along the path edge). Same thing with vertical measurement - do you measure around every clod of dirt? Every particle of clay? The length would be the same but how it appears will be drastically different. It's going to be an approximation, no matter what you choose. Good luck with the lawyers
... View more
10-20-2015
10:35 AM
|
0
|
0
|
860
|
POST
|
Sorry if I'm missing something obvious in your requirments - but why not just 3D buffer the stream, then intersect that result with a surface model to generate an "effective buffer"?
... View more
10-20-2015
08:10 AM
|
1
|
4
|
860
|
POST
|
You can use IRowChanges and IFeatureChanges, just QI to an existing IFeature object.
... View more
07-16-2015
10:07 AM
|
1
|
2
|
418
|
POST
|
It should work if you check for IMosaicLayer instead of IMosaicDataset.
... View more
02-23-2015
09:11 AM
|
1
|
1
|
362
|
POST
|
FocusMap is one of the last things to get populated as a map document is loaded. At what point is your code being called? If your tool is listening to document events you would want to get a reference to the map after IDocumentEvents.OpenDocument and/or IActiveViewEvents.FocusMapChanged have fired. If you don't need the reference to FocusMap until the tool is being used anyway, there's nothing wrong with calling it from your MyToolClass as you have already done.
... View more
12-30-2014
09:09 AM
|
0
|
0
|
205
|
POST
|
If you want to do this only using ArcObjects look into the IProximityOperator interface: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m0000031w000000 Otherwise you might look into the Near tool to build tables relating your point layer and target layers: http://resources.arcgis.com/en/help/main/10.2/index.html#//018p00000007000000
... View more
08-08-2014
10:33 AM
|
1
|
0
|
510
|
POST
|
INewRectangleFeedback.Stop returns an IGeometry object...you can test to see what type of IGeometry was returned, cast it to the correct type of object, and proceed from there.
... View more
07-25-2014
09:44 AM
|
0
|
1
|
372
|
POST
|
Originally I had symbolized the feature class based on two attribute fields using the unique values renderer. I thought that there would be a way to convert the symbolized feature class to a representation which would also convert its symbology into representation rules using ArcObjects (much like it does in ArcMap). Is this possible? Perhaps update the ConvertToRepMarker function to accept a feature layer as input. Then loop through the UniqueValueRenderer for your target layer, create a new rule for each symbol and add it to the pRepresentationRules object. After that, select features by attributes and calculate the correct RuleID for each group.
... View more
05-16-2014
08:40 AM
|
0
|
0
|
487
|
POST
|
Has the RuleID field of the feature class been calculated to a valid value for your rule? Hello, I'm having trouble with converting a feature class to a representation that also converts its symbology to representation rules. I know this is possible within ArcMap. Basically what I'd like to do is to programmatically convert a feature class that is symbolized based on unique values to a representation which then contains a representation rule for each symbolized category. Following the sample codes given by ESRI, I was able to convert a feature class to a representation that has no representation rules. I then tried to test out ESRI's sample code to convert a marker symbol into a representation symbol and adding this to the representation rules when converting the feature class. However, the marker did not show up in ArcMap (everything was a red square). I have a feeling that this is because the symbol I tried to use was one that we made ourselves and added to the style library as a picture marker symbol. Unfortunately I'm having trouble finding enough resources to accomplish this myself so if anyone can point me in the right direction, I would really appreciate it! I've included my code below:
Module Representation
Public Sub CreateRepClass(ByVal layerName As String)
Try
Dim pMxDoc As IMxDocument
Dim pMap As IMap
Dim pLayer As IFeatureLayer
Dim pFClass As IFeatureClass
Dim index As Integer
'Get the feature class I want to convert:
pMxDoc = My.ArcMap.Application.Document
pMap = pMxDoc.FocusMap
index = FindLayer(layerName)
pLayer = pMap.Layer(index)
pFClass = pLayer.FeatureClass
Dim pDataset As IDataset
Dim pWorkspace As IWorkspace
Dim pRepWSExt As IRepresentationWorkspaceExtension
Dim pRules As IRepresentationRules
'Get the workspace from the feature class:
pDataset = pFClass
pWorkspace = pDataset.Workspace
pRepWSExt = GetRepWSExt(pWorkspace) 'Get the representation extension using function below
'Get the representation rules using the function below:
pRules = ConvertToRepMarker() 'New RepresentationRules
'Create representation class from feature class and rules:
pRepWSExt.CreateRepresentationClass(pFClass, pFClass.AliasName + "_Rep", "My_RuleID", "My_Override", True, pRules, Nothing)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Public Function GetRepWSExt(ByVal pWorkspace As IWorkspace) As IRepresentationWorkspaceExtension
Dim pExtManager As IWorkspaceExtensionManager
Dim pUID As IUID
'Assign new UID
pExtManager = pWorkspace
pUID = New UID
pUID.Value = "{FD05270A-8E0B-4823-9DEE-F149347C32B6}"
'Find and return the representation workspace extension
Dim pRepWSExt As IRepresentationWorkspaceExtension
pRepWSExt = pExtManager.FindExtension(pUID)
Return pRepWSExt
End Function
Public Function ConvertToRepMarker() As IRepresentationRules
Dim pRepresentationRules As IRepresentationRules
Dim pMarker As IMarkerSymbol
Dim pRepresentationRule As IRepresentationRule
Dim pRepRuleInit As IRepresentationRuleInit
'Create new representation rules:
pRepresentationRules = New RepresentationRules
'Find the symbol from the style library using a function
'This function has been tested before and works
pMarker = FindSymbol("MarkerName", "Category")
'Create new representation rule:
pRepresentationRule = New RepresentationRule
pRepRuleInit = pRepresentationRule
pRepRuleInit.InitWithSymbol(pMarker) 'Convert marker symbol to representation
'Give the rule a name:
Dim ID As Long
ID = pRepresentationRules.Add(pRepresentationRule)
pRepresentationRules.Name(ID) = "TestRule"
'Return the representation rules:
Return pRepresentationRules
End Function
End Module
... View more
05-15-2014
08:49 AM
|
0
|
0
|
487
|
Title | Kudos | Posted |
---|---|---|
1 | 06-14-2016 08:33 AM | |
1 | 02-23-2015 09:11 AM | |
3 | 07-14-2017 10:29 AM | |
1 | 07-16-2015 10:07 AM | |
2 | 10-16-2018 10:59 AM |
Online Status |
Offline
|
Date Last Visited |
12-08-2020
02:52 PM
|