|
POST
|
My apologies for mis-understanding, Jill. I suggested My. as within a class, that works in .net for any form and yes, of course it would not work if the function is outside the form class. I am aware every form will have an initialize, its Private Sub InitializeComponent() or your probably referring to FormLoad ? there is no Initialize as you put it that I see in vb.net for a declaration. So the function is all on its own (separate class). Ok, which is calling a table. Sorry, I would just have the function in each form class... not sure how this would be achieved. Neil will hopefully guide you in the right direction and I will learn something.
... View more
04-01-2011
10:04 AM
|
0
|
0
|
1754
|
|
POST
|
Its Mike, you need to be using 3.5 framework, not 4 (that is not until release 10.1) from what I understood at the summit: You can not be using 'any CPU' when compiling and sending off to a 64 bit run processor hence why i mentioned x86. You can no longer use RegASM as a means, hence why esri incorporated their own. If your stating your dlls are ANY CPU, you will see failures as you see. You can verify this by hitting a 32 bit machine, and everything probably works. Hence why unable to find 10.0 esri.arcGisSystem dll, because they are only 32 bit dlls Are you using .net 2010 professional or similar? Which arc are you using? SP1 installed? Have you tried contacting someone from ESRI? Have you read http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/What_s_new_for_developers_at_10/0001000002zp000000/ and http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/ESRIRegAsm_utility/0001000004n6000000/ The registration logic within existing libraries does not need to be rewritten (categories are still identified using globally unique identifiers [GUIDs]), but existing libraries must be re-registered with ESRIRegAsm.exe or they will not function with any installation of ArcGIS after version 9.3.1.
... View more
04-01-2011
06:57 AM
|
0
|
0
|
2129
|
|
POST
|
Well, not quite sure what you are trying to attempt.. but I see a few things. a) There is NO need for a function, your not sending a return value. so as for the Form. IF its all in the same CLASS, just use me. Are you suggesting that sub UserForm is a Different form than THISForm? Private Sub UserForm_Initialize()
PopulateEditorNameComboBox()
End Sub
Public Sub PopulateEditorNameComboBox()
For i = 1 to EditorNameCollection.Count
me.cboEditor.AddItem (EditorNameCollection.item(i)) 'Add item to combo box on indicated form
Next i
End Function
There are many methods to pass data between forms if that is what you are doing... Delegates / Properties /contructor / object
... View more
04-01-2011
06:52 AM
|
0
|
0
|
1754
|
|
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
|
1002
|
|
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
|
2129
|
|
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
|
1464
|
|
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
|
1225
|
|
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
|
1229
|
|
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
|
1225
|
|
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
|
553
|
|
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
|
893
|
|
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
|
1192
|
|
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
|
1291
|
|
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
|
956
|
| 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
|