POST
|
wow, shell... old school windows 7 structures program files differently as well as user folders... (x86 for starters) so USERNAME is going to be a different path... As richard states, should work, try throwing the MXD is a simple folder path to test.
... View more
03-31-2011
07:18 PM
|
0
|
0
|
517
|
POST
|
There appears to be a weird file not found error occuring on some custom DLL's when EsriRegAsm is being executed on Windows 7 x64. I believe ESRIRegAsm is loading Framework 4's 64bit RegAsm which in turn can't find the ESRI Framework 2.0 32bit dlls. I say this because, when I modified C:\Program Files (x86)\Common Files\ArcGIS\bin\ESRIRegAsm.exe.config from this <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0"/> <supportedRuntime version="v2.0.50727"/> </startup> to this <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v2.0.50727"/> </startup> ESRIRegAsm.exe worked... Also anybody thinking they can avoid using EsriRegAsm by using IComponentCategoryManager. Don't waste your time. IComponentCategoryManager does NOT register in the ecfg file. It puts it in COM! ESRI, it would be nice if there was a IComponentCategory2 that could read and write the ecfg's correctly. When you compile, because objects are still 32 bit, you must choose x86 as a CPU, not using 'ANY', otherwise, it will as you stated, your program dll will look for 64 bit files that don't exist.
... View more
03-31-2011
06:45 PM
|
0
|
0
|
1164
|
POST
|
Or another option is to set the FORM properties to TopMost = True Obviously the reults two methods are a tad different.
... View more
03-31-2011
10:52 AM
|
0
|
0
|
826
|
POST
|
Thanks John, The solution and fix for this issue was, indeed the file missing completely and occurred when using Arc10 ref: NIM060652 - Missing add-in schema file (.xsd) when installing IDE integration with VS Express edition Fix: Install file: ArcObjectsSDKNET10sp1.msp This issue is fixed with Service Pack 1 SDKNet install package This of course can be found on the patches and service packs web page.
... View more
03-30-2011
01:07 PM
|
0
|
0
|
729
|
POST
|
Thought this thread is a few months old, ill answer anyways. Hope this helps out Gary. (Im not a C# fan... so its vb here) I'm having the same problem understanding where this would be implemented using an ArcMap 10 Add-in. I'd like two of my toolbar buttons to default to 'image and text' but the only place I can see the toolbar referenced is in the Config.esriaddinx XML. Where should this code be placed so that if fires on startup? A VB.Net code snippet would be a bonus. Assume I have a toolbar named 'Toolbar1' and a single button named 'Button1'. Cheers. I have read other methods such as through the extension if one is created. Where is the code Fired from? ENABLED property Public ReadOnly Property Enabled() As Boolean Implements ICommand.Enabled
SetAsInconAndText()
end Property
And here is the call 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 created!
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 = "Property NAME used for tool" Then ' use the Property NAME of the button
pCommandBar.Item(i).Style = esriCommandStyles.esriCommandStyleIconAndText
Exit For
End If
Next
End If
End Sub
... View more
03-30-2011
11:26 AM
|
0
|
0
|
695
|
POST
|
I need to edit the Config.esriaddinx xml configuration file for my ArcGIS 10 add-in. According to the documentation, intellisense is supposed to aid me in this task. However, when I edit the file, it doesn't offer any usable suggestions. My IDE configuration is VB Express 2008 with ArcGIS 10 SDK. Is this working for others? Alternatively I would like to find the complete XML schema so I can at least refer to that. The schema tree is available in the ArcObjects .NET Developer help but you have to drilldown through the tree to get what you need. Sometimes the complete schema is easier to use. What was the solution to this? I have the same issue. No XML intellisense. And there are no Tool Palette examples that I have found for drop down (of serveral more buttons) from the toolbar.
... View more
03-29-2011
01:20 PM
|
0
|
0
|
729
|
POST
|
ArcPy yes, convenient new approach... here is VB.net approach with good comments included! 'Time to export the map
pAnimProcessor.Message = "Exporting to PNG file..."
'Create variables for map and extent
'Set the current map and TELL IT TO LOOK AT THE LAYOUT VIEW!
pMxDoc = m_application.Document
pActiveView = pMxDoc.PageLayout
'Create export object and set the resolution
Dim pExport As IExport
pExport = New ExportPNG
'Get display bounds and graphics content
Dim DisplayBounds As tagRECT
If TypeOf pActiveView Is IPageLayout Then
DisplayBounds = pActiveView.ExportFrame
Else
DisplayBounds.left = 0
DisplayBounds.top = 0
DisplayBounds.right = pActiveView.ScreenDisplay.DisplayTransformation.DeviceFrame.right
DisplayBounds.bottom = pActiveView.ScreenDisplay.DisplayTransformation.DeviceFrame.bottom
End If
'get the export rectangle
Dim exportRect As tagRECT
Dim outputresolution As Integer
Dim screenresolution As Integer
outputresolution = 300 'desired resolution
screenresolution = 96 ' default screen resolution
pExport.Resolution = outputresolution
'The ExportFrame property gives us the dimensions appropriate for an export at screen resolution.
' Because we are exporting at a higher resolution (more pixels), we must multiply each dimesion
' by the ratio of OutputResolution to ScreenResolution. Instead of assigning the entire
' ExportFrame directly to the exportRECT, let's bring the values across one at a time and multiply
' the dimensions.
With exportRect
.bottom = Convert.ToInt32(DisplayBounds.bottom * (outputResolution / screenResolution))
.left = Convert.ToInt32(DisplayBounds.left * (outputResolution / screenResolution))
.top = Convert.ToInt32(DisplayBounds.top * (outputResolution / screenResolution))
.right = Convert.ToInt32(DisplayBounds.right * (outputResolution / screenResolution))
End With
'Set the size and extent of the export
Dim pPixelBoundsEnv As IEnvelope
pPixelBoundsEnv = New Envelope
pPixelBoundsEnv.PutCoords(exportRect.left, exportRect.top, exportRect.right, exportRect.bottom)
pExport.PixelBounds = pPixelBoundsEnv
'Set file name and export map
Dim hDC As Long
pExport.ExportFileName = OutputPath & "\" & [INSERT NAME HERE] & ".png"
hDC = pExport.StartExporting
pActiveView.Output(hDC, pExport.Resolution, exportRect, Nothing, Nothing)
pExport.FinishExporting()
pExport.Cleanup()
... View more
03-28-2011
07:55 AM
|
0
|
0
|
306
|
POST
|
Python does this all in one step, it was shown at the 2011 Developer Summit
... View more
03-25-2011
10:08 AM
|
0
|
0
|
438
|
POST
|
figured out that too 🙂 will update my vba code once my task is complete thanks, Priyanka You may want to consider recompiling in something other than VBA if you plan on continuing along with Arc Upgrades, as this will be just as expired as Avenue in due time. There is no further VBA support when arc10.1 comes out. This is stated on many release documents. Just saying, if you are going to invest a bunch of time migrating things over, better look at the pros and cons of something that will not work in a few months with the latest release. ArcGIS 10.0 is the last release of Microsoft Visual Basic for Applications (VBA); we will no longer support VBA beyond the ArcGIS 10.0 release. Esri strongly recommends that no further development occur on this platform. Beyond ArcGIS 10.0, Esri will no longer be able to support VBA as a development platform. Users who have custom functionality built using VBA should actively plan strategies to rewrite their applications using a supported development language such as Python, VB.NET, or C# so their applications continue to be operational and supported in future releases of ArcGIS.' ref: http://downloads2.esri.com/support/TechArticles/ArcGIS10and101Deprecation_Plan.pdf
... View more
03-22-2011
01:57 PM
|
0
|
0
|
586
|
POST
|
This can be avoided by selecting x86 CPU rather than 'ANY CPU' when compiling. (advanced compiling options)
... View more
03-22-2011
01:49 PM
|
0
|
0
|
578
|
POST
|
Is there a way to just add a custom tool to a custom toolbar and have them stay where I last left them everytime I open arcmap? I need help. Please ESRI I need your help. Not sure which version of Arc you are running, but VBA is a dead end for 10.1 Using .net is your answer. Also, you state Customizing Toolbar but in your above statement you say ' When I reopen, there is no tool in the custom Toolbox' Im guessing you mean toolbar menu? not the TOOLBOX as in ArcToolbox As for your current issue. closing your modified MXD, will save to the local machines user mxt (normal.mxt) file as mentioned by Sean. if your using windows XP its >> Documents Settings [ user name ] \ Application Data \ ESRI \ ArcMap \ Templates\ Normal.mxt Your system icons are in the ArcGIS \ BIN \ Icons for 9.3. This is of course, you dont have any other arcmaps running as well. Creation of the button an icon selected from the bin\Icons in 9.3 works no problem, not sure where your issue would be. You could try just adding the button to an existing toolbar (e.g. Main Menu bar), change the image, close ArcMap Session, then open. Could be something wrong with the custom toolbar created. Or missing normal.mxt reference in your VBA project
... View more
03-22-2011
01:28 PM
|
0
|
0
|
583
|
POST
|
I also use the IApprot interface. Added showing the Map title being attached to Dim m_appROT As ESRI.ArcGIS.Framework.IAppROT
m_appROT = New ESRI.ArcGIS.Framework.AppROT
Dim q As Object
'Cycle through appROT to work on the latest ArcMap open
If m_appROT.Count > 0 Then
For q = 0 To m_appROT.Count - 1
'If TypeOf m_appROT.Item(i) Is IGxApplication Then ' ArcCatalog running
If TypeOf m_appROT.Item(q) Is IMxApplication Then ' ArcMap running
If m_appROT.Item(q).Visible = True Then
If m_appROT.Item(q).Document.Title = lblConnectedTo.Text Then
pApp = m_appROT.Item(q) ' The session originally used.
End If
End If
End If
Next q
End If Now you can go from there... Also added a public for several forms pObjectFactory = CType(pApp, IObjectFactory)
pApp = pObjectFactory
pDoc = pApp.Document
pApp = pDoc.Parent
pMxDoc = CType(pDoc, IMxDocument)
pMap = CType(pMxDoc.FocusMap, IMap) ' Focus on the map
Me.ArcGISApplication = pApp ' pass this to the public A little extra, getting carried away, but now you can just use m_application in any SUB or Function Public WriteOnly Property ArcGISApplication() As ESRI.ArcGIS.Framework.IApplication
Set(ByVal value As ESRI.ArcGIS.Framework.IApplication)
m_application = value
End Set
End Property
... View more
03-22-2011
12:52 PM
|
0
|
0
|
368
|
POST
|
This of course will not apply to Visual Basic Express Edition
... View more
03-22-2011
12:50 PM
|
0
|
0
|
1540
|
POST
|
Thanks for your replay. But, the part you commented on i have done already. I basically need to know how to open featurelayer and add a point to it. But the part you have done was not mentioned in your initial post, nor was the fact that you were specifically looking for open featurelayer and adding a point. Just saying, makes it somewhat difficult. Also, correcting 'ThisDocument' issue you would have had, I would have thought would have been more of an issue than adding a featurelayer... (CartoClass) Use the API's provided by ESRI or C# Developer Kit or perhaps someone with extensive C# can help you. And will look something like this: { IFeatureLayer featureLayer = new FeatureLayerClass(); IFeatureClass featureClass = featureLayer.FeatureClass; }
... View more
03-16-2011
09:50 AM
|
0
|
0
|
404
|
Title | Kudos | Posted |
---|---|---|
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 | |
1 | 01-08-2016 02:43 PM |
Online Status |
Offline
|
Date Last Visited |
12-25-2023
08:32 AM
|