Quantcast
Channel: Question and Answer » arcobjects
Viewing all 66 articles
Browse latest View live

Selected Feature how to zoom in ArcMap viewer window

$
0
0

I will selected one feature in ArcMap that feature zoom in viewer window in ArcMap i tried in ArcMap VBA but no result

Public Sub zoomtool()

Dim pDoc As IMxDocument
Set pDoc = ThisDocument
Dim pMap As IMap
Set pMap = pDoc.FocusMap

———————————————–Here how to call viewer window

enter image description here

Set act = pMap

Dim pLayer As IFeatureLayer
Dim pFSel As IFeatureSelection
For i = 0 To pMap.LayerCount - 1

Set pLayer = pMap.Layer(i)
Set pFSel = pLayer

'Get the selected features
Dim pSelSet As ISelectionSet
Set pSelSet = pFSel.SelectionSet

Dim pEnumGeom As IEnumGeometry
Dim pEnumGeomBind As IEnumGeometryBind

Set pEnumGeom = New EnumFeatureGeometry
Set pEnumGeomBind = pEnumGeom
pEnumGeomBind.BindGeometrySource Nothing, pSelSet

Dim pGeomFactory As IGeometryFactory
Set pGeomFactory = New GeometryEnvironment

Dim pGeom As IGeometry
Set pGeom = pGeomFactory.CreateGeometryFromEnumerator(pEnumGeom)

pDoc.ActiveView.Extent = pGeom.Envelope
pDoc.ActiveView.Refresh
Next i

End Sub 

Arcobjects add-in stops working with no apparent error

$
0
0

I am developing a simple add-in that will trigger an action after user selects features on the map (the action will essentially make sure a dockable window is open and in that window display information about the selected features).

I have implemented a simple function that loops over selected features using IEnumFeature and collects their OIDs. To make sure the OIDs are present for all features in the selection, I set the IEnumFeatureSetup.AllFields = true.

Now to the problem. After I’ve selected a number features several times (regardless of what features or how many I select), the SelectionChanged event stops from being fired. It appears as if the add-in has crashed, but no error message is displayed. This happens both in debug and production. If I try to restart the add-in by de-selecting it in the Customise – Extensions menu, I can no longer select it back. ArcMap works fine otherwise. To get the add-in to work again I must restart ArcMap.

The features come from a file geodatabase. They have 5 short text fields each and there is around 1300 of them. The more features I select at once, the less rounds of feature selection it takes for the add-in to crash.

Unlike in ArcGIS crashes with no error number in Visual Studio I get no ArcGIS error or exception!

I am developing in Arcobjects 10.1 SDK with Visual Studio 10 for C# Express using .NET 3.5. I cannot upgrade nor can I use .NET 4.0 due to client constraints. The add-in is being tested in ArcMap 10.1.

private void SelectionChanged_Handler() {

    List<string> locodes = new List<string>();

    try {
        ISelection selection = ArcMap.Document.FocusMap.FeatureSelection;
        IEnumFeature featuresEnum = (IEnumFeature)selection;
        IEnumFeatureSetup featureSetup = (IEnumFeatureSetup)selection;

        featureSetup.AllFields = true;

        IFeature feature;

        while ((feature = featuresEnum.Next()) != null) {

            int locodeFldID = feature.Fields.FindField("locode");
            string locode = feature.get_Value(locodeFldID).ToString();
            locodes.Add(locode);

            // Release feature object
            Marshal.FinalReleaseComObject(feature);
        }

        // Release IEnum reference
        Marshal.FinalReleaseComObject(featuresEnum);

        } catch (Exception e) {
            System.Windows.Forms.MessageBox.Show(e.Message);
        }
    }
}

Why is the add-in crashing (stopping to work) without apparent error. Might this be related to resources not being freed correctly?

Exception access violation while executing Java ArcObject application

$
0
0

I have developed an visual application using ArcObjects SDK for Java 10.2 which worked well until yesterday.

Since, I’m facing a fatal error (full trace below) while I don’t feel I have changed anything.

The crash occurs when a JFrame is created containing a PageLayoutBean, then the JVM calls NativeObjRef.getJdk13WindowsHandleNative(), and then the ntvinv.dll calls Java_com_esri_arcgis_system_EngineInitializer_initLicensing.

According to the description of the file, Ntvinv.dll is

‘Native Invocation Library for ArcGIS Java Interop’

.

I don’t see where licensing could be a problem as ArcMap starts well, and the other ArcObjects calls also work.

I just discovered that there was a similar function available in Java:

public static void initLicensing(int product, String pathToBin)
Initialize the ArcObjects for ArcGIS Server with options optimal for usage in a ArcGIS Server

Maybe parameters are wrong..

For information, I run the program from Eclipse but the error also occurs running outside.

Is there any configuration used by this ntvinv.dll such as registry key or environment variable?

This problem is very blocking for me, so I would be very grateful to get any help.

Here’s the error log:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7ce71790, pid=3848, tid=6472
#
# JRE version: 6.0_43-b01
# Java VM: Java HotSpot(TM) Client VM (20.14-b01 mixed mode windows-x86 )
# Problematic frame:
# C  [ntvinv.dll+0x11790]
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#


---------------  T H R E A D  ---------------


Current thread (0x0262a800):  JavaThread "main" [_thread_in_native, id=6472, stack(0x00430000,0x00480000)]


siginfo: ExceptionCode=0xc0000005, reading address 0x00000000


Registers:
EAX=0x00000000, EBX=0x00000000, ECX=0xbc5bb6fa, EDX=0x0047f51c
ESP=0x0047f3ec, EBP=0x0047f644, ESI=0x0262a928, EDI=0x00000000
EIP=0x7ce71790, EFLAGS=0x00010202


Top of Stack: (sp=0x0047f3ec)
0x0047f3ec:   14864e80 0262a928 14864e80 0047f694
0x0047f3fc:   0047f6a4 0047f660 6a5c2e2e 625c6572
0x0047f40c:   6a5c6e69 2e747761 006c6c64 415c3a43
0x0047f41c:   49476372 65445c53 6f6c6576 4b726570
0x0047f42c:   30317469 6a5c322e 5c617661 5c65726a
0x0047f43c:   5c65726a 5c6e6962 7477616a 6c6c642e
0x0047f44c:   00540000 005904d8 00000000 0262a800
0x0047f45c:   0262b060 00000000 00000007 0047f554


Instructions: (pc=0x7ce71790)
0x7ce71770:   60 90 eb 7c 8b f8 85 ff 75 7a 53 e8 20 fd ff ff
0x7ce71780:   8b d8 8d 94 24 30 01 00 00 2b d3 eb 03 8d 49 00
0x7ce71790:   8a 08 88 0c 02 40 84 c9 75 f6 8d 94 24 30 01 00
0x7ce717a0:   00 52 ff 15 60 90 eb 7c 53 8b f8 e8 88 3f 02 00




Register to memory mapping:


EAX=0x00000000 is an unknown value
EBX=0x00000000 is an unknown value
ECX=0xbc5bb6fa is an unknown value
EDX=0x0047f51c is pointing into the stack for thread: 0x0262a800
ESP=0x0047f3ec is pointing into the stack for thread: 0x0262a800
EBP=0x0047f644 is pointing into the stack for thread: 0x0262a800
ESI=0x0262a928 is an unknown value
EDI=0x00000000 is an unknown value




Stack: [0x00430000,0x00480000],  sp=0x0047f3ec,  free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [ntvinv.dll+0x11790]  Java_com_esri_arcgis_system_EngineInitializer_initLicensing+0x1020


Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.esri.arcgis.interop.NativeObjRef.getJdk13WindowsHandleNative(Ljava/awt/Canvas;)J+0
j  com.esri.arcgis.interop.NativeObjRef.a(Ljava/awt/Canvas;)J+1
j  com.esri.arcgis.interop.r.getHandleForCanvas(Ljava/awt/Canvas;)J+1
j  com.esri.arcgis.interop.Ocx.a()J+48
j  com.esri.arcgis.interop.Ocx.addNotify()V+94
j  com.esri.arcgis.controls.PageLayoutControl.addNotify()V+5
j  java.awt.Container.addNotify()V+61
j  javax.swing.JComponent.addNotify()V+1
j  java.awt.Container.addNotify()V+61
j  javax.swing.JComponent.addNotify()V+1
j  java.awt.Container.addNotify()V+61
j  javax.swing.JComponent.addNotify()V+1
j  java.awt.Container.addNotify()V+61
j  javax.swing.JComponent.addNotify()V+1
j  javax.swing.JRootPane.addNotify()V+1
j  java.awt.Container.addNotify()V+61
j  java.awt.Window.addNotify()V+73
j  java.awt.Frame.addNotify()V+70
j  java.awt.Window.show()V+8
j  java.awt.Component.show(Z)V+5
j  java.awt.Component.setVisible(Z)V+2
j  java.awt.Window.setVisible(Z)V+2
j  latitude.arcobjects.utils.MapWindow.setPageLayout(Lcom/esri/arcgis/carto/IPageLayout;)V+51
j  latitude.arcobjects.proxy.PageProxy.startVisualMode(Lcom/esri/arcgis/geometry/IEnvelope;)V+20
j  latitude.application.export.Export.main([Ljava/lang/String;)V+2519
v  ~StubRoutines::call_stub


---------------  P R O C E S S  ---------------


Java Threads: ( => current thread )
  0x192f5400 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=6220, stack(0x2b5d0000,0x2b620000)]
  0x19352800 JavaThread "AWT-Shutdown" [_thread_blocked, id=5696, stack(0x21870000,0x218c0000)]
  0x19252c00 JavaThread "Thread-3" daemon [_thread_in_native, id=6980, stack(0x1a7f0000,0x1a840000)]
  0x19281000 JavaThread "J-Integra COM initialization thread (please don't touch)" daemon [_thread_blocked, id=468, stack(0x19710000,0x19760000)]
  0x19280800 JavaThread "ArcGIS VisualBean Mode STA Thread" daemon [_thread_in_native, id=2652, stack(0x19680000,0x196d0000)]
  0x1927f800 JavaThread "AWT-Windows" daemon [_thread_in_native, id=6760, stack(0x195b0000,0x19600000)]
  0x1927a800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2632, stack(0x19490000,0x194e0000)]
  0x0253f400 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3088, stack(0x18cd0000,0x18d20000)]
  0x0253c800 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=3256, stack(0x18c00000,0x18c50000)]
  0x0253a400 JavaThread "JDWP Command Reader" daemon [_thread_in_native, id=5640, stack(0x18b60000,0x18bb0000)]
  0x02534400 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=976, stack(0x18b10000,0x18b60000)]
  0x02532000 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_blocked, id=700, stack(0x18a30000,0x18a80000)]
  0x02528000 JavaThread "Attach Listener" daemon [_thread_blocked, id=6232, stack(0x188d0000,0x18920000)]
  0x02524c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6240, stack(0x18840000,0x18890000)]
  0x024f5000 JavaThread "Finalizer" daemon [_thread_blocked, id=6616, stack(0x187b0000,0x18800000)]
  0x024f3800 JavaThread "Reference Handler" daemon [_thread_blocked, id=6708, stack(0x18720000,0x18770000)]
=>0x0262a800 JavaThread "main" [_thread_in_native, id=6472, stack(0x00430000,0x00480000)]


Other Threads:
  0x024ef000 VMThread [stack: 0x18690000,0x186e0000] [id=3836]
  0x1917b800 WatcherThread [stack: 0x18d60000,0x18db0000] [id=3320]


VM state:not at safepoint (normal execution)


VM Mutex/Monitor currently owned by a thread: None


Heap
def new generation   total 4928K, used 3885K [0x04630000, 0x04b80000, 0x09b80000)
  eden space 4416K,  76% used [0x04630000, 0x0497d6f0, 0x04a80000)
  from space 512K,  98% used [0x04a80000, 0x04afe058, 0x04b00000)
  to   space 512K,   0% used [0x04b00000, 0x04b00000, 0x04b80000)
tenured generation   total 10944K, used 2157K [0x09b80000, 0x0a630000, 0x14630000)
   the space 10944K,  19% used [0x09b80000, 0x09d9b5d8, 0x09d9b600, 0x0a630000)
compacting perm gen  total 16384K, used 16187K [0x14630000, 0x15630000, 0x18630000)
   the space 16384K,  98% used [0x14630000, 0x155fee48, 0x155ff000, 0x15630000)
No shared spaces configured.


Code Cache  [0x02630000, 0x02798000, 0x04630000)
total_blobs=721 nmethods=477 adapters=187 free_code_cache=32092160 largest_free_block=1216


Dynamic libraries:
0x00400000 - 0x00425000 C:ArcGISDeveloperKit10.2javajrebinjavaw.exe
0x77240000 - 0x773c0000 C:WindowsSysWOW64ntdll.dll
0x75ec0000 - 0x75fd0000 C:Windowssyswow64kernel32.dll
0x76100000 - 0x76147000 C:Windowssyswow64KERNELBASE.dll
0x76d00000 - 0x76da1000 C:Windowssyswow64ADVAPI32.dll
0x76930000 - 0x769dc000 C:Windowssyswow64msvcrt.dll
0x76520000 - 0x76539000 C:WindowsSysWOW64sechost.dll
0x76bb0000 - 0x76ca0000 C:Windowssyswow64RPCRT4.dll
0x74bc0000 - 0x74c20000 C:Windowssyswow64SspiCli.dll
0x74bb0000 - 0x74bbc000 C:Windowssyswow64CRYPTBASE.dll
0x75d70000 - 0x75e70000 C:Windowssyswow64USER32.dll
0x75fd0000 - 0x76060000 C:Windowssyswow64GDI32.dll
0x76150000 - 0x7615a000 C:Windowssyswow64LPK.dll
0x76060000 - 0x760fd000 C:Windowssyswow64USP10.dll
0x769f0000 - 0x76a50000 C:Windowssystem32IMM32.DLL
0x76540000 - 0x7660c000 C:Windowssyswow64MSCTF.dll
0x7c340000 - 0x7c396000 C:ArcGISDeveloperKit10.2javajrebinmsvcr71.dll
0x6d8c0000 - 0x6db70000 C:ArcGISDeveloperKit10.2javajrebinclientjvm.dll
0x70500000 - 0x70532000 C:Windowssystem32WINMM.dll
0x73790000 - 0x737dc000 C:Windowssystem32apphelp.dll
0x6d870000 - 0x6d87c000 C:ArcGISDeveloperKit10.2javajrebinverify.dll
0x6d3d0000 - 0x6d3ef000 C:ArcGISDeveloperKit10.2javajrebinjava.dll
0x6d420000 - 0x6d449000 C:ArcGISDeveloperKit10.2javajrebinjdwp.dll
0x6d740000 - 0x6d746000 C:ArcGISDeveloperKit10.2javajrebinnpt.dll
0x6d8b0000 - 0x6d8bf000 C:ArcGISDeveloperKit10.2javajrebinzip.dll
0x6d2b0000 - 0x6d2b7000 C:ArcGISDeveloperKit10.2javajrebindt_socket.dll
0x75e80000 - 0x75eb5000 C:Windowssyswow64WS2_32.dll
0x75e70000 - 0x75e76000 C:Windowssyswow64NSI.dll
0x70b50000 - 0x70b60000 C:Windowssystem32NLAapi.dll
0x70b40000 - 0x70b50000 C:Windowssystem32napinsp.dll
0x70b20000 - 0x70b32000 C:Windowssystem32pnrpnsp.dll
0x70db0000 - 0x70dec000 C:WindowsSystem32mswsock.dll
0x73800000 - 0x73844000 C:Windowssystem32DNSAPI.dll
0x70b10000 - 0x70b18000 C:WindowsSystem32winrnr.dll
0x70ae0000 - 0x70b07000 C:Program Files (x86)Common FilesMicrosoft SharedWindows LiveWLIDNSP.DLL
0x769e0000 - 0x769e5000 C:Windowssyswow64PSAPI.DLL
0x762c0000 - 0x76317000 C:Windowssyswow64SHLWAPI.dll
0x74520000 - 0x7453c000 C:Windowssystem32IPHLPAPI.DLL
0x74510000 - 0x74517000 C:Windowssystem32WINNSI.DLL
0x70aa0000 - 0x70ad8000 C:WindowsSystem32fwpuclnt.dll
0x70a90000 - 0x70a96000 C:Windowssystem32rasadhlp.dll
0x70cb0000 - 0x70cb5000 C:WindowsSystem32wshtcpip.dll
0x6d6b0000 - 0x6d6c3000 C:ArcGISDeveloperKit10.2javajrebinnet.dll
0x70a80000 - 0x70a86000 C:WindowsSystem32wship6.dll
0x6d0b0000 - 0x6d1fc000 C:ArcGISDeveloperKit10.2javajrebinawt.dll
0x74a80000 - 0x74ad1000 C:Windowssystem32WINSPOOL.DRV
0x76160000 - 0x762bc000 C:Windowssyswow64ole32.dll
0x71000000 - 0x7119e000 C:WindowsWinSxSx86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18807_none_41e554362bd82458COMCTL32.dll
0x6f1f0000 - 0x6f203000 C:Windowssystem32DWMAPI.DLL
0x6ee30000 - 0x6eeb0000 C:Windowssystem32uxtheme.dll
0x6d2e0000 - 0x6d32f000 C:ArcGISDeveloperKit10.2javajrebinfontmanager.dll
0x7ce60000 - 0x7ced5000 C:ArcGISDesktop10.2binntvinv.dll
0x76db0000 - 0x76e3f000 C:Windowssyswow64OLEAUT32.dll
0x76b20000 - 0x76ba3000 C:Windowssyswow64CLBCatQ.DLL
0x71ea0000 - 0x71eb1000 C:Program Files (x86)Common FilesArcGISbinArcGISVersion.dll
0x64530000 - 0x6455b000 C:WindowsWinSxSx86_microsoft.vc90.atl_1fc8b3b9a1e18e3b_9.0.30729.7523_none_51c8dd18bbe8adecATL90.DLL
0x644a0000 - 0x6452e000 C:WindowsWinSxSx86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.7523_none_508f21ccbcbbb7a8MSVCP90.dll
0x711a0000 - 0x71243000 C:WindowsWinSxSx86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.7523_none_508f21ccbcbbb7a8MSVCR90.dll
0x732f0000 - 0x73307000 C:Windowssystem32CRYPTSP.dll
0x731c0000 - 0x731fb000 C:Windowssystem32rsaenh.dll
0x73220000 - 0x7322e000 C:Windowssystem32RpcRtRemote.dll
0x617b0000 - 0x61987000 C:ARCGISDESKTOP10.2BINDADFLib.dll
0x74ae0000 - 0x74ae9000 C:Windowssystem32VERSION.dll
0x74ff0000 - 0x75c3b000 C:Windowssyswow64SHELL32.dll
0x64480000 - 0x64497000 C:ARCGISDESKTOP10.2BINAoInitializer.dll
0x74a10000 - 0x74a20000 C:ARCGISDESKTOP10.2BINAppInitializerLib.dll
0x61510000 - 0x617a2000 C:ARCGISDESKTOP10.2BINAfCore.dll
0x70580000 - 0x70591000 C:Windowssystem32NETAPI32.dll
0x70570000 - 0x70579000 C:Windowssystem32netutils.dll
0x70550000 - 0x70569000 C:Windowssystem32srvcli.dll
0x70540000 - 0x7054f000 C:Windowssystem32wkscli.dll
0x704e0000 - 0x704f2000 C:Windowssystem32MPR.dll
0x74d70000 - 0x74deb000 C:Windowssyswow64COMDLG32.dll
0x61060000 - 0x61501000 C:ARCGISDESKTOP10.2BINAfCore_libFNP.dll
0x72d10000 - 0x72d19000 C:Windowssystem32snmpapi.dll
0x76320000 - 0x764bd000 C:Windowssyswow64SETUPAPI.dll
0x76900000 - 0x76927000 C:Windowssyswow64CFGMGR32.dll
0x76a70000 - 0x76a82000 C:Windowssyswow64DEVOBJ.dll
0x74560000 - 0x74567000 C:Windowssystem32WSOCK32.dll
0x72be0000 - 0x72c1c000 C:Windowssystem32OLEACC.dll
0x6f140000 - 0x6f14a000 C:Windowssystem32wbemwbemprox.dll
0x6f150000 - 0x6f1ac000 C:Windowssystem32wbemcomn.dll
0x6f050000 - 0x6f05f000 C:Windowssystem32wbemwbemsvc.dll
0x6ef70000 - 0x6f006000 C:Windowssystem32wbemfastprox.dll
0x6ef50000 - 0x6ef68000 C:Windowssystem32NTDSAPI.dll
0x76680000 - 0x766af000 C:Windowssyswow64WINTRUST.dll
0x75c40000 - 0x75d61000 C:Windowssyswow64CRYPT32.dll
0x766b0000 - 0x766bc000 C:Windowssyswow64MSASN1.dll
0x728b0000 - 0x728b3000 C:Windowssystem32icmp.Dll
0x70b90000 - 0x70b9d000 C:Windowssystem32dhcpcsvc6.DLL
0x70b70000 - 0x70b82000 C:Windowssystem32dhcpcsvc.DLL
0x6d590000 - 0x6d5ac000 c:arcgisdesktop10.2binccjw.dll
0x60ed0000 - 0x61060000 C:WindowsWinSxSx86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.18834_none_72d38c5186679d48gdiplus.dll
0x7e690000 - 0x7e69f000 c:arcgisdesktop10.2binreghelp.dll
0x64390000 - 0x6447a000 C:ARCGISDESKTOP10.2BINBGLAPI.dll
0x60e00000 - 0x60ec6000 C:ARCGISDESKTOP10.2BINBGLGeomChestLib.dll
0x72830000 - 0x728a9000 C:Windowssystem32mscms.dll
0x76a50000 - 0x76a67000 C:Windowssyswow64USERENV.dll
0x76670000 - 0x7667b000 C:Windowssyswow64profapi.dll
0x7a130000 - 0x7a180000 C:ARCGISDESKTOP10.2BINLCMS117LIB.DLL
0x60d20000 - 0x60df2000 C:ARCGISDESKTOP10.2BINBGLFontEngine.dll
0x79540000 - 0x7965f000 C:ARCGISDESKTOP10.2BINicuuc44.dll
0x781d0000 - 0x79011000 C:ARCGISDESKTOP10.2BINicudt44.dll
0x79350000 - 0x79383000 C:ARCGISDESKTOP10.2BINicule44.dll
0x64360000 - 0x6438f000 C:ARCGISDESKTOP10.2BINBGLAPILib.dll
0x60c80000 - 0x60d1f000 C:ARCGISDESKTOP10.2BINImageAccessLib.dll
0x60be0000 - 0x60c73000 C:ARCGISDESKTOP10.2BINBGLRasterizerLib.dll
0x79300000 - 0x7930f000 C:ARCGISDESKTOP10.2BINicuio44.dll
0x79160000 - 0x792e5000 C:ARCGISDESKTOP10.2BINicuin44.dll
0x73610000 - 0x73705000 C:Windowssystem32propsys.dll
0x74a50000 - 0x74a71000 C:Windowssystem32ntmarta.dll
0x76cb0000 - 0x76cf5000 C:Windowssyswow64WLDAP32.dll
0x60b60000 - 0x60bd6000 C:ARCGISDESKTOP10.2BINBGLToGDIHelper.dll
0x64330000 - 0x64358000 C:ARCGISDESKTOP10.2BINBGLSymbolsLib.dll
0x60ab0000 - 0x60b5c000 C:ARCGISDESKTOP10.2BINBGLImageCoders.dll
0x637f0000 - 0x63828000 C:Windowssystem32icm32.dll
0x60950000 - 0x60aa7000 C:WindowsSystem32msxml6.dll
0x60900000 - 0x60944000 C:ARCGISDESKTOP10.2BINBGLCache.dll
0x60620000 - 0x608f6000 C:ARCGISDESKTOP10.2BINGeometry.dll
0x605f0000 - 0x60612000 C:Windowssystem32GLU32.dll
0x60520000 - 0x605e8000 C:Windowssystem32OPENGL32.dll
0x60430000 - 0x60517000 C:Windowssystem32DDRAW.dll
0x71de0000 - 0x71de6000 C:Windowssystem32DCIMAN32.dll
0x7d3a0000 - 0x7d79b000 C:ARCGISDESKTOP10.2BINpe.dll
0x1c350000 - 0x1c3ad000 C:ARCGISDESKTOP10.2BINsg.dll
0x60220000 - 0x60425000 C:ARCGISDESKTOP10.2BINExtTopoEngine.dll
0x1d060000 - 0x1d4be000 C:ARCGISDESKTOP10.2BINsde.dll
0x6f3d0000 - 0x6f3df000 C:Windowssystem32SAMCLI.DLL


VM Arguments:
jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:49309 -Dfile.encoding=Cp1252
java_command: latitude.application.export.Export
Launcher Type: SUN_STANDARD


Environment Variables:
PATH=C:Python27ArcGIS10.2;C:ARCGISDESKTOP10.2BIN;C:ArcGISDeveloperKit10.2javajrebin;C:PROGRA~2FieryCOMMAN~1plugins;C:PROGRA~2COMMON~1EFI;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Perl64sitebin;C:Perl64bin;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:Program FilesCommon FilesMicrosoft SharedWindows Live;C:Program Files (x86)Common FilesMicrosoft SharedWindows Live;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program Files (x86)Windows LiveShared;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:apache-maven-3.2.1bin;C:Program Files (x86)Microsoft ASP.NETASP.NET Web Pagesv1.0;C:Program FilesMicrosoft SQL Server110ToolsBinn;C:Program Files (x86)Windows Kits8.0Windows Performance Toolkit;C:Program Filesnodejs;C:Python27ArcGISx6410.2;C:Program FilesTortoiseGitbin;C:Program Files (x86)Gitcmd;C:Program Files (x86)GeoConcept SAGeoConcept;C:Program Files (x86)GeoConcept SAGeoLibData;C:Program Files (x86)GeoConcept SAGeoConcept;C:UsersKevinAppDataRoamingnpm;C:MinGWbin;C:Program Files (x86)Inkscape
USERNAME=Kevin
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel






---------------  S Y S T E M  ---------------


OS: Windows 7 , 64 bit Build 7601 Service Pack 1


CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 60 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht


Memory: 4k page, physical 8322424k(5368132k free), swap 16643012k(13279444k free)


vm_info: Java HotSpot(TM) Client VM (20.14-b01) for windows-x86 JRE (1.6.0_43-b01), built on Mar  1 2013 02:51:23 by "java_re" with MS VC++ 7.1 (VS2003)


time: Wed Jun 10 11:52:47 2015
elapsed time: 98 seconds

Releasing Cursors using ArcObjects?

$
0
0

I am working with ArcObjects, in particular the ICursor Interface. I am creating a cursor and looping through a query’s result set. My problem/concern is how to close or delete or release the cursor once I’m done looping through the query’s result set. The query is being passed into a Sql workspace (via ISqlWorkspace interface). Code is as follows

ISqlWorkspace pSQL_WS = myWorkspace as ISqlWorkspace;                
ICursor pCursor = pSQL_WS.OpenQueryCursor(strQuery);
string cursorResults = "";
IRow pRow;

while ((pRow = pCursor.NextRow()) != null)
{
  int fc = pRow.Fields.FieldCount;
  for (int x = 0; x < fc; x++)
  {
    cursorResults += pRow.get_Value(x).ToString() + "     ";
  }
    cursorResults += Environment.NewLine;
}
_textElement.Text = Convert.ToString(cursorResults); 

I’m actually taking the results of the query and placing them in a text element. I’m thinking after the last line is where I’d want to close/delete/release my cursor, but I’m just not sure how to go about doing this.

Debugging ArcMap Add-In .Net 4.5 : Unable to start ArcMap.exe

$
0
0

I am developping an ArcMap 10.3 Add-In targeting .NET framework 4.5 on Visual Studio 2013. I used ESRI’s wizard to build a simple button add-in and the projects debug properties are configured to start the external program “C:Program Files (x86)ArcGISDesktop10.3binArcMap.exe”.

The add-in ran properly when I started debuggig the Add-In for the first time but I couldn’t get the breakpoints to hit. I followed ESRI recommandation “How to debug” on ESRI online help and modified the ArcMap.exe.config file to enable supported runtime 4.0.30319

<startup>
     <supportedRuntime version="v4.0.30319"/>
      <!-- <supportedRuntime version="v2.0.50727"/> -->
</startup>

The next time I started debuggin the Add-In I get an error message from Visual Studio : “Error while trying to run project: Unable to start program ‘C:Program Files (x86)Desktop10.3binArcMap.exe’.”

Visual Studio 2013 error

This error message comes right after ArcMap’s splash screen. The following screenshot is not from the actual Add-in because the splash screen appears and disappears way too fast and I can’t get screenshot.

ArcMap 10.3 splash screen

I tried different things but without success :

  • build the project using different platforms :”Any CPU” and “x86″
  • changed “ArcCatalog.exe.config” file to use the same supported runtime
  • restarted computer
  • used different supported runtime version: version=”v4.0.30319″, version=”v4.0″, version=”v4.5″

I dont know what to do next to be able to debug the Add-in. I don’t want to develop without this feature!

Any help would be greatly appreciated.

Thanks

Update Feature records in ArcGIS 10

$
0
0

I have to update multiple feature records in ArcGIS through ArcObjects.
Below is my code.

It’s running fine for first time but it’s giving me error while it’s going to run the queryfilter for nexttime it’s giving me error “Insufficient permissions“.

foreach (test toProcess in forProcess)

{
                    int OID = toProcess.R1;
                    int GISID = toProcess.R2;
                    double sLength = toProcess.R3;

                    string wherec = "OBJECTID = '" + OID + "' AND GISID = '" + GISID + "'";


                //initialize queryfilter
                queryFilter.SubFields = "*";
                queryFilter.WhereClause = wherec;

                //search through queryfilter
                IFeatureCursor featureCursor2 = featureClass.Search(queryFilter, false);
                //Get the output features 
                IFeature featurenew = featureCursor2.NextFeature();

                //while (featurenew != null) (not using as at a time only 1 feature)
                //{
                    IObject pObject = featurenew;
                    int iNewTag = GISAUConstants.kiNoSequenceValue;

                    // Get a new tag value from tag sequence within workspace.
                    iNewTag = CommonFunct.GetSequenceValue(GISAUConstants.ksGISIDSequenceName, workspace);

                    if (iNewTag <= GISAUConstants.kiNoSequenceValue)
                        throw new Exception("Invalid tag value: " + iNewTag);

                    // Get the field index, by model name.
                    int fieldIndex = CommonFunct.GetFirstFieldIndexByModelName(pObject, GISAUConstants.ksMNFieldGISID);

                    // Did we get a valid field index?
                    if (fieldIndex == GISAUConstants.kiNoField)
                        throw new Exception(" does not have field with model name: " + GISAUConstants.ksMNFieldGISID);

                    // All is well... write tag value to the field.
                    featurenew.set_Value(fieldIndex, iNewTag);
                    featurenew.Store();
                    //featureselection.Clear();

                    logger.WriteLine(DateTime.Now.ToString() + " Object ID : " + OID + " Previous GISID : " + OID + " >> New GISID : " + iNewTag);

                    //featurenew = featureCursor.NextFeature(); (as I have only single feature)
                }

Get IFields without opening ITable

$
0
0

We are using ArcObjects 10.0 to retrieve IFields through opening ITable, which is time-consuming.

Is it possible to retrieve just IFields directly from database without opening ITable?

EDIT
I’m using IFeatureWorkspace.OpenTable(name) to open ITable from ArcSDE geodatabase and get its fields. It gets around 1 sec to open one table. Lets assume, that we need to open 10 tables, then it’d get 10 seconds just to get fields (no data). This is considerable delay.

polygon Self intersection find in arcobjects

$
0
0

how to get self intersection polygons in arcobjects could you please tell me how to get already i got self intersection for polyline features as per below code but it is not working on polygon features

if (intF.Shape.GeometryType == esriGeometryType.esriGeometryPolyline)
{
    IPolyline pline = intF.Shape as IPolyline;
    ITopologicalOperator3 ptopo = pline as ITopologicalOperator3;
    esriNonSimpleReasonEnum reasen = esriNonSimpleReasonEnum.esriNonSimpleSelfIntersections;
    ptopo.IsKnownSimple_2 = false;
    if (!ptopo.get_IsSimpleEx(out reasen))
    {
    if (reasen == esriNonSimpleReasonEnum.esriNonSimpleSelfIntersections)
    {
        selfinterfind = true;
    }
    }
    if (selfinterfind == true)
    {
    dt.Rows.Add(intF.OID, intF.Class.AliasName, "", "Self Intersection Found");
    }
}

Drawing line between two selected points in ArcMap using C#? [on hold]

$
0
0

I’m a beginner developer, and I’m trying to draw line between two selected points in ArcMap using c# code.

How can I do this?

Initial state of VB .net checkbox to toggle ArcMap layer visibility

$
0
0

I have a checkbox control as part of an ArcMap add-in with a dockable window in VB .net that turns a particular layer’s visibility on and off in ArcMap. The initial state is set to “unchecked”. But, if I load the tool into ArcMap and use it when that layer is already visible, the checkbox works in reverse (checked when the layer is off and unchecked when the layer is on). Is there any way I can check the visibility of the layer when the tool is first loaded and then set the state of the checkbox?

I tried putting some code in Public Sub New() function for my dockable window, but this crashed ArcMap. Here is what I had (with 3 dots representing other code). My checkbox is named chkBasemap. In this simple example, there are always only 2 layers in my map. I just assume the basemap layer I want to toggle the visibility of is always the second layer. The first layer is a polygon layer.

Imports ESRI.ArcGIS.ArcMapUI
Imports ESRI.ArcGIS.Carto
Imports ESRI.ArcGIS.CartoUI
Imports ESRI.ArcGIS.Display
Imports ESRI.ArcGIS.Framework
Imports ESRI.ArcGIS.Geodatabase
Imports ESRI.ArcGIS.Geometry
Imports ESRI.ArcGIS.esriSystem

Public Class DockWinClimateTools

  Public Sub New(ByVal hook As Object)
        InitializeComponent()
        AddItems()
        CheckStates()
        Me.Hook = hook
  End Sub

  Private m_hook As Object
  Public Property Hook() As Object
    Get
      Return m_hook
    End Get
    Set(ByVal value As Object)
      m_hook = value
    End Set
  End Property

  Public Class AddinImpl
    Inherits ESRI.ArcGIS.Desktop.AddIns.DockableWindow

    Private m_windowUI As DockWinClimateTools

    Protected Overrides Function OnCreateChild() As System.IntPtr
      m_windowUI = New DockWinClimateTools(Me.Hook)
      Return m_windowUI.Handle
    End Function

    Protected Overrides Sub Dispose(ByVal Param As Boolean)
      If m_windowUI IsNot Nothing Then
        m_windowUI.Dispose(Param)
      End If
    End Sub
  End Class

  Private Sub chkBasemap_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkBasemap.CheckedChanged
      Dim pMxDoc As IMxDocument = My.ArcMap.Application.Document
      Dim pMap As IMap = pMxDoc.FocusMap
      Dim pLayer As ILayer = pMap.Layer(1)

      If pLayer.Visible Then
          pLayer.Visible = False
      Else
          pLayer.Visible = True
      End If

      pMxDoc.ActiveView.ContentsChanged()
      pMxDoc.ActiveView.Refresh()
  End Sub

  Public Sub CheckStates()
        Dim pMxDoc As IMxDocument = My.ArcMap.Application.Document
        Dim pMap As IMap = pMxDoc.FocusMap
        Dim baseLayer As ILayer = pMap.Layer(1)
        If baseLayer.Visible Then
            chkBasemap.Checked = True
        Else
            chkBasemap.Checked = False
        End If
   End Sub
End Class

ArcGIS Runtime or ArcObjects – which should I learn to become a GIS Developer? [closed]

$
0
0

I’m a GIS analyst hoping to upgrade to GIS Developer some day. I hope to make this switch for a few reasons:

  • I think I can earn more money as a developer (generally true?).
  • I’m tired of scrubbing data and other mundane aspects of analysis.
  • I love programming. Currently I do as much work as possible with
    Python.

The direction of development that interests me is for Windows/desktop applications, since this is what I know and work with the most. I’d like input into which direction to pursue to be as marketable as possible. So should I focus on ArcObjects or ArcGIS Runtime? ArcObjects seems very popular, and between ArcObjects and Runtime there are far more questions for ArcObjects here on this site. But is Runtime going to eventually be a replacement for ArcObjects? Is it generally superior and just needs to catch on? In the job market for GIS development currently, which will be best? Or should I focus on a something completely different to become a developer that I’m not even aware of?

Simple data vs non simple data in ArcGIS

$
0
0

I want to enter some data in a feature class with ArcObjects. In my code I use EditSession for that, but in storing data an error returned that says I must use editsession. By researching I found that the feature class is non-simple data, and yesterday I find that this non-simple data option is because of creating a M-M relationship. At the end my goal is to enter data into this non-simple feature class with this code.

public string insertdata(string tablename, List<tableRow> fields, string primerykey)
    {
        IEnumDataset datasets = ws.get_Datasets(esriDatasetType.esriDTAny);
        IDataset dataset = null;
        ITable table = null;

            IFeatureWorkspace fws = ws as IFeatureWorkspace;
            IFeatureDataset fdataset = fws.OpenFeatureDataset("Electrical");
            datasets = fdataset.Subsets;
            do
            {
                dataset = datasets.Next();
                table = dataset as ITable;

                if (dataset == null) return "Table not exist";

            } while (dataset.Name != tablename);


        IWorkspaceEdit ews = ws as IWorkspaceEdit;
        ews.StartEditing(false);
        ews.StartEditOperation();


        IRow row = null;
            table.Fields.FindField(primerykey);
            string value = "123";  }
            }
            ICursor cursor = null;
            IQueryFilter2 queryFilter = new QueryFilterClass();
            queryFilter.WhereClause = primerykey + "='" + value + "'";
            cursor = table.Search(queryFilter, false);
            row = cursor.NextRow();

        foreach (tableRow field in fields)
        {
            Type type = field.type;
            int ind = row.Fields.FindField(field.name);
            if (ind == -1) return "Field not exist";
            row.Value[ind] = Convert.ChangeType(field.value, type);

        }

        row.Store();

        ews.StopEditOperation();
        ews.StopEditing(true);

        return "Row inserted succesfull";
    }

This method worked on all datasets but in one of them an error returned that says: “Objects in this class cannot be updated outside an edit session.”

I want to know what the difference between “simple data” and “non-simple data” is in an ArcGIS geodatabase? And how can I convert non-simple to simple data?

ArcObjects interface to construct circles with segments instead of arcs

$
0
0

I am trying to see if it is feasible, using ArcObjects (VB.NET), to create a tool to construct circles comprised of line segments instead of arcs. I’ve looked over the available interfaces here but do not see one for the task.

Is anyone aware of an interface to make this fairly straight forward?

Can an ArcGIS Desktop Add-In Tool have two or more input events?

$
0
0

I’m trying to create an add-in for ArcMap in Visual Studio that adds points on mouse clicks and then executes some geoprocessing on those points when the enter key is pressed.

So far sifting through the ArcObjects help has yielded a few things that I’ve tried unsuccessfully to put together:

I’m wondering if it’s even possible to have more than one of these “events” activated by a tool or if I’m barking up the wrong tree and should be attempting a different method?

Here is a skeleton of some code I have so far:

namespace MultiEventTest
{
    public class Tool1 : ESRI.ArcGIS.Desktop.AddIns.Tool
    {
        public Tool1()
        {
        }

        protected override void OnUpdate()
        {
            Enabled = ArcMap.Application != null;
        }

        protected override void OnMouseDown(MouseEventArgs arg)
        {
        //code to add points to feature class
        }

        protected override void OnKeyDown(KeyEventArgs arg)
        {
            if (arg.ModifierKeys == (System.Windows.Forms.Keys.Enter))
            {
                //code to execute geoprocessing
            }
        }

        }
    }

Making feature layer selectable in ArcObjects Java without getting AutomationException 0×80004005?

$
0
0

I am currently making a FeatureLayer from a resultset.

The feature layer seems to work properly and will display on the map.

However when I choose “select all” on my feature layer I get the following automation exception:

AutomationException: 0x80004005 - Unspecified error
at com.esri.arcgis.carto.FeatureLayer.selectFeatures(Unknown Source)
at cc.nisc.mapping.controls.actions.selection.SelectAllAction.doActionPerformed(SelectAllAction.java:32)
at cc.nisc.gui.action.NiscAction.actionPerformed(NiscAction.java:225)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6516)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
at java.awt.Component.processEvent(Component.java:6281)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)

my relevant code is listed below:

 try {
        String sqliteFile = String.valueOf(mwfFileSystem.getFesDirectory()) + "\query_exports\" + queryName + ".sqlite";


        workspace = WorkspaceFactory.SQLITE.openFromFile(
                sqliteFile);

        IFeatureLayer featureLayer = new FeatureLayer();
        featureLayer.setSelectable(true);
            featureLayer.setFeatureClassByRef(workspace.openFeatureClass(queryName));
        featureLayer.setName(queryName);
        ActiveMapContainer mapContainer = ActiveMapContainer.getInstance();

        mapContainer.getMap().addLayer(featureLayer);
    } catch (ArcEngineException | IOException e) {
        e.printStackTrace();
    }

LayerToKml no clamped to ground

$
0
0

How do I change the kmz new file to be clamped to ground?
I have this code in the picture:Convert shape to kmz

That works just fine but when I “fetch” it to the Google plug-in it’s not “clamped to ground”.
I need somehow to reset the “Z value”.

So, I choose to go with “LayerToKml” function.

LayerToKml convert = new LayerToKml(shape, KMZTempFile);
convert.ignore_zvalue = "true";
var tempLoc = convert.out_kmz_file;

But I probably did something wrong because the new kmz file is not created in the destination.

So what is the right way to do this in c#?

.net arcobjects retrieve user value from layer data source

$
0
0

I have a need to get the user value from a layer properties.

The value is from: Layer Properties -> Source -> user in Data Source (sorry not enough score to attach the picture).

I tried to check the ILayerProperties, but haven’t found the method related to the user value.

Anybody has the experience?

Arcobjects vb.net stringbuilder

$
0
0

I’m newbie and have question about string builder to show the arcgis layers.
(System: ArcGis 10.2, VisualStudio2012)
I don’t succeed to show the loaded layers in a line of the message box.

code:

Imports ESRI.ArcGIS.Geodatabase
Imports ESRI.ArcGIS.Carto
Imports ESRI.ArcGIS.ArcMapUI
Imports System.Text

Public Class LayerLoop2_Button1
  Inherits ESRI.ArcGIS.Desktop.AddIns.Button

  Public Sub New()

  End Sub

  Protected Overrides Sub OnClick()

        AccessLayerViaMxDocument(My.ArcMap.Document)
        My.ArcMap.Application.CurrentTool = Nothing
    End Sub

    Shared Sub AccessLayerViaMxDocument(ByVal pMxDocument As IMxDocument)
        Dim pMap As IMap
        Dim pMaps As IMaps = pMxDocument.Maps
        Dim i As Integer

        For i = 0 To pMaps.Count - 1 Step i + 1
            pMap = pMaps.Item(i)
            Debug.WriteLine(pMap.Name)
            MsgBox(pMap.Name)

            Dim pEnumLayer As IEnumLayer = pMap.Layers(Nothing, True)
            pEnumLayer.Reset()
            Dim pLayer As ILayer = pEnumLayer.Next()
            Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder()


            While Not pLayer Is Nothing

                Debug.WriteLine(pLayer.Name)
                ' Show MessageBox with the name of the layer


                pLayer = pEnumLayer.Next()

                sb.Append(pLayer.Name)
                MsgBox(sb.ToString())

            End While

        Next


    End Sub

How to sort attribute table using ArcObjects/VBA code?

$
0
0

I’m using ArcMap 9.3.

Shift the rows order display (ascending/descending) for a given field is as simple as double clicking on the screen.

However I’d like to know how to perform this simple operation through automation, in my case, using VBA code.

I’ve done searches over several interfaces such as ITableDefinition, ITableSort, IIndex with no success. ITableSort does exactly this but I did not find out an interface to pass its arguments to IDisplayTable.

Can someone help me find the parameters to pass?

This operation is not allowed while editing error

$
0
0

When I tried to delete a feature, I got :This operation is not allowed while editing” error when I wanted to refresh version.

The related code is:

'Start Editing Operation
        lpWorkSpaceEdit.StartEditing(True)

        Do Until lpFeature Is Nothing
            Call CheckCPStatus(lpFeature, lbIsCPDead, lbIsCPNull)

            lpVerFC = lpObjSDEUtils.GetFeatureClass(lpCreatWS, lsLayerName)
            If Not lpVerFC.GetFeature(lpFeature.OID) Is Nothing Then
                lpVerFeat = lpVerFC.GetFeature(lpFeature.OID)
                lpVerFeat.Delete()

            End If

            'Iterate through the next feature
            lpFeature = lpFeatCursor.NextFeature
        Loop

        'Chech if the Created version has parent
        If lpCreatVer.HasParent Then
            lsParentVersionName = lpCreatVer.VersionInfo.Parent.VersionName
        Else
            MsgBox("You can only reconcile a version that has a parent.", MsgBoxStyle.Information, "App")
        End If

        'Get the SDE Default's Latest Version
        'lpVersionEdit.Reconcile(lsParentVersionName)
        lpCreatVer.RefreshVersion()

        lpVersionEdit.Reconcile(lsParentVersionName)

        If lpVersionEdit.CanPost Then
            lpVersionEdit.Post(lsParentVersionName)
        End If

        'StopEditing Operation
        lpWorkSpaceEdit.StopEditing(True)

        lpVersionEdit.RefreshVersion()

Is there anything wrong with my code? How can I delete a feature properly?

Viewing all 66 articles
Browse latest View live