|
POST
|
Anyone ? No one attempted to modify the Main Bar? add a menu and add a button in the menu with addins?
... View more
06-30-2011
06:33 AM
|
0
|
0
|
1262
|
|
POST
|
Many of our installers write values to the registry which are then read by our ArcGIS extensions. We've never had to change anything with the registry keys in order to make our applications install and run on both 32-bit and 64-bit machines. See this article on MSDN: http://msdn.microsoft.com/en-us/library/aa384232(v=vs.85).aspx Agreed. I only use this as I have made a Patch and Service pack automation program... separate issue from the OP and not related to the thread... Just thought I would post how to, but your link covers all the answers.
... View more
06-27-2011
11:19 AM
|
0
|
0
|
1333
|
|
POST
|
Try to use HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\Desktop10.0 for ArcGIS Desktop It should works fine on 32bit and 64 bits WinOS. if you need ArcGIS Engine use HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS Engine Runtime Good luck, No, this information is incorrect and only applies to a 32 bit OS. i know this post is somewhat old, but I thought I would post the solution and correct info As the OP stated, using a 64 bit OS windows 7 application changes the Keys to a sub folder called \ \Wow6432Node\ This is where the \Wow6432Node\ ESRI \ ArcGIS \ InstallDir value can be found to determine installation directory. What I do, for anyone reading this is to use a function I wrote to determine the OS first, then knowing which OS, find out if its 64 or 32 bit, to go through the appropriate SUBKEY folders and value sets. e.g. Public Function Is64Bit()
'will return 64 or 32
Is64Bit = GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth
End Function And getting OS version Public Function GetOSVersion() As String
Select Case Environment.OSVersion.Platform
Case PlatformID.Win32S
Return "Win 3.1"
Exit Function
Case PlatformID.Win32Windows
Select Case Environment.OSVersion.Version.Minor
Case 0
Return "Win95"
Exit Function
Case 10
Return "Win98"
Exit Function
Case 90
Return "WinME"
Exit Function
Case Else
Return "Unknown"
Exit Function
End Select
Case PlatformID.Win32NT
Select Case Environment.OSVersion.Version.Major
Case 3
Return "NT 3.51"
Exit Function
Case 4
Return "NT 4.0"
Exit Function
Case 5
Select Case _
Environment.OSVersion.Version.Minor
Case 0
Return "Win2000"
Exit Function
Case 1
Return "WinXP"
Exit Function
Case 2
Return "Win2003"
Exit Function
End Select
Case 6
Return "Vista/Win2008Server/Windows7" '
Exit Function
Case Else
Return "Unknown"
Exit Function
End Select
Case PlatformID.WinCE
Return "Win CE"
Exit Function
End Select
Return "Unknown"
End Function
... View more
06-27-2011
08:01 AM
|
0
|
0
|
1333
|
|
POST
|
Hi everyone, Has anyone figured out a way to add a Menu to the MAIN (Root) menu toolbar using Addins? So a menu in between File and EDIT or after HELP. I know you can modify the Main Toolbar via ESRIRegAsm com object w/ deployed MSI installable.. but what about ADDINS? I can Create a new Menu ... but then unable to do anything from there...(button wise) in an Extention Addin Setting: Dim TopMenuBar As ESRI.ArcGIS.Framework.ICommandBar
TopMenuBar = GetToolbarByName(My.ArcMap.Application, "esriArcMapUI.MxMenuBar")
TopMenuBar.CreateMenu("Menu TEST", 1) The Main Toolbar {56599DD3-E464-11D1-9496-080009EEBECB} esriArcMapUI.MxFileMenu Thanks, in advance.
... View more
06-24-2011
09:17 AM
|
0
|
9
|
3075
|
|
POST
|
Both great ideas! and complement each other for full automation. Modify the xml or better yet, thanks Sean! Very slick OS feature. Thank you both! -Mike Full solution was creating an exe that did everything. Modifying the machines xml for addin folder path as well as using the folder2.self.verbs.item(i).DoIt() on the network path to initialize offline caching. (looking for the "Always &available offline" of course... for the integer value) works slick, one click... everyone is happy.
... View more
05-13-2011
06:43 AM
|
0
|
0
|
1094
|
|
POST
|
Both great ideas! and complement each other for full automation. Modify the xml or better yet, thanks Sean! Very slick OS feature. Thank you both! -Mike
... View more
05-10-2011
06:38 AM
|
0
|
0
|
1094
|
|
POST
|
Hopefully someone has a solution to this... ESRI has this cool ability for Shared Addins, using a server path for example within an organization. Unfortunately, once the machine is un-plugged from that network, the path, along with all the tools are removed... this causes issues for Laptop users as well as the odd network glitch (if it happens during arc startup / shutdown) The ability to plug into the network with, lets say a laptop, have the most recent tools through the shared addin, unplug, go to a meeting somewhere else, utilize those tools, then get any updates once plugged back into the network seems ideal and care free for the user. Otherwise, its drag all the files over, repath addisn to that folder, once back at office, remove path, re-path to other, open arc, close arc to set the latest addins in place. Except for that cool part where ESRI decided to have the Addin REMOVE everything, INCLUDING the folder path in the Options tab of the addin manager if the path is no longer there, I like addins otherwise. Suggestions? Opinions? Am I missing something? workarounds? Currently using Editor 10.0 Build 3200 on most machines. I guess just another custom program to be made...
... View more
05-09-2011
09:47 AM
|
0
|
6
|
1512
|
|
POST
|
My recommendation is to stick with 3.5 and move to 4.0 only after ESRI supports it. BINGO! Search function is your friend!
... View more
05-09-2011
07:05 AM
|
0
|
0
|
1359
|
|
POST
|
I will REPOST what I posed: its in my above post: If TypeOf pMap.Layer(j) Is ESRI.ArcGIS.Carto.IGroupLayer
... View more
05-06-2011
07:28 AM
|
0
|
0
|
1500
|
|
POST
|
Hi everyone, I was wondering, if someone would enlighten me on this small, but annoying issue. Either I am severly looking over something, or ESRI has a bit more fine tuning to do. When creating an extension (using Addins template); I am Unable to get the text within the Description box to create New Lines (or CRLF) or <br> (Ive tried it all), just using ENTER in the XML. All the ESRI extensions have a nice written description without having one long line requiring a scroll over. Perhaps I need more coffee. I have attached a visual.
... View more
04-28-2011
12:55 PM
|
0
|
2
|
895
|
|
POST
|
Well, its not that easy... Pending which version as well, 9.3 prior, you must make the toolbar/button with IToolbarDef code... then its hooking to the application from there... registering the dll using regasm32 on a windows xp machine If you are using 10, you then use addins, now you have to write the XML and such... You will notice .THISdocument is now replaced wtih namespace MY when using addins... Here is your converted code, but unfortunately, its not just going to be a copy paste, publish and it works. There is more involved. e.g. Gathering the references associating the class into ArcMap etc.... button etc. Not sure, but your code is just simply adding a field, perhaps a model would suit you better. Imports System.Windows.Forms
Imports ESRI.ArcGIS.ArcMapUI
Imports ESRI.ArcGIS.Carto
Imports ESRI.ArcGIS.Geodatabase
Public Class Class1
Sub AddField_Name1()
Try
'
'
Dim pMxDoc As IMxDocument
Dim pLayer As ILayer
Dim pFLayer As IFeatureLayer
Dim pFeatClass As IFeatureClass
Dim NewField As IFieldEdit
Dim strFieldName As String
Dim intFieldType As Integer
Dim intLength As Integer
'
'
'Verweis auf das aktuelle Dokument
pMxDoc = My.ArcMap.Document 'ThisDocument
'
pLayer = pMxDoc.SelectedLayer
If pLayer Is Nothing Then
MessageBox.Show("Achtung, es ist kein Layer selektiert", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
Exit Sub
End If
pFLayer = pLayer
pFeatClass = pFLayer.FeatureClass
'
' Eingabe der Feldnamen
strFieldName = "Name1"
'
'
NewField = New Field
With NewField
.Length_2 = 75
.Type_2 = esriFieldType.esriFieldTypeString
.Name_2 = strFieldName
End With
'
' Kontrolle, ob Feldname schon vorhanden
If pFeatClass.FindField(strFieldName) > -1 Then
MessageBox.Show("Das Feld '" & strFieldName & "' ist bereits vorhanden, bitte anderen Feldnamen angeben!", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
Exit Sub
Else
MessageBox.Show( "Das Feld '" & strFieldName & "' ist noch nicht vorhanden und wird erzeugt!")
End If
'
pFeatClass.AddField(NewField) 'Neues Feld wird hinzugefügt
'
Catch ex As Exception
MessageBox.Show("Es ist ein Fehler aufgetreten, das Programm wird beendet!", "", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
End Class
... View more
04-08-2011
09:11 AM
|
0
|
0
|
857
|
|
POST
|
OP, I would quickly assume that they did not add their .net developer kit and use the Template to create their addin... My is the Namespace created when created using the Developer Template addin CLASS. (Your addin solution) Namespace My will contain the Friend Module ThisAddin and pass any XML information to the Solution project. Friend Module ArcMap
Private s_app As ESRI.ArcGIS.Framework.IApplication
Private s_docEvent As ESRI.ArcGIS.ArcMapUI.IDocumentEvents_Event
Public ReadOnly Property Application() As ESRI.ArcGIS.Framework.IApplication
Get
If s_app Is Nothing Then
s_app = TryCast(Internal.AddInStartupObject.GetHook(Of ESRI.ArcGIS.ArcMapUI.IMxApplication)(), ESRI.ArcGIS.Framework.IApplication)
End If
Return s_app
End Get
End Property
Public ReadOnly Property Document() As ESRI.ArcGIS.ArcMapUI.IMxDocument
Get
If Application IsNot Nothing Then
Return TryCast(Application.Document, ESRI.ArcGIS.ArcMapUI.IMxDocument)
End If
Return Nothing
End Get
End Property
Public ReadOnly Property ThisApplication() As ESRI.ArcGIS.ArcMapUI.IMxApplication
Get
Return TryCast(Application, ESRI.ArcGIS.ArcMapUI.IMxApplication)
End Get
End Property
Public ReadOnly Property DockableWindowManager() As ESRI.ArcGIS.Framework.IDockableWindowManager
Get
Return TryCast(Application, ESRI.ArcGIS.Framework.IDockableWindowManager)
End Get
End Property
Public ReadOnly Property Events() As ESRI.ArcGIS.ArcMapUI.IDocumentEvents_Event
Get
s_docEvent = TryCast(Document, ESRI.ArcGIS.ArcMapUI.IDocumentEvents_Event)
Return s_docEvent
End Get
End Property
End Module Then you can use My namespace and get ArcMap.Application rhalko: Why should ESRI document how to use XML? We all know special characters in different codes require attention. Hopefully your afternoon gets better now that you found what was wrong. XML characters If you want to use & & e.g. <company>AT&T</company>
... View more
04-07-2011
11:58 AM
|
0
|
0
|
1191
|
|
POST
|
Hi everyone, Simple but frustrating problem: Prior to arcAddinx, there was no problem choosing to have Image / Text or Both for any button when a toolbar was loaded using the following code below triggered off the ENABLED using ESRICommandStyles. (IToolbarDef) Public Sub SetAsIconAndText()
' Make sure button is showing Icon And Text
Dim pUID As New UID
pUID.Value = "{F53B91E1-C520-41a7-941C-686AA071D1A2}" ' Toolbar GUID
Dim pCommandBar As ESRI.ArcGIS.Framework.ICommandBar
pCommandBar = m_application.Document.CommandBars.Find(pUID, True, False)
Dim i As Integer
If Not pCommandBar Is Nothing Then
For i = 0 To pCommandBar.Count - 1
If pCommandBar.Item(i).Name = "FocusCorp_FocusEllipse" Then ' use the Property NAME of the button
pCommandBar.Item(i).Style = esriCommandStyles.esriCommandStyleIconAndText
Exit For
End If
Next
End If
End Sub I am aware that a user can AFTER the fact customize, but why would ESRI have left this functionality out with Addin XML? Is there anyone that has found the means to control what each button displays on created toolbars when using Addins as far as Image and Caption? Suggestions appreciated, vb.net Thanks
... View more
04-07-2011
07:50 AM
|
0
|
13
|
9992
|
|
POST
|
Yes, I publish tools all the time that allow arcmap interaction while forms are up. (Downfall is user can alter TOC and other stuff while in the middle of your processes if your program involves counts etc, it can get messy, but thats besides the point. FormWindowState.Normal and do a [Your]form.show()
... View more
04-04-2011
11:38 AM
|
0
|
0
|
1464
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-27-2024 09:04 AM | |
| 1 | 01-06-2016 11:32 AM | |
| 1 | 12-13-2021 10:03 PM | |
| 1 | 07-19-2017 07:31 AM | |
| 1 | 01-18-2016 07:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|