POST
|
Yes, if an admin on that computer creates a registry setting with a location to the add-in, then all users on that computer will automatically see that add-in. Check out the help docs for "Advanced add-in concepts": http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/Advanced_add_in_concepts/0001000004n7000000/ The relevant section is at the very bottom of that page. "Administrators can also use the registry to specify additional folders to probe for add-ins. This feature can be used by administrators to control user access to add-ins. To add administrator folders, manually enter a new AddInFolders key under the Settings key and add a new string value for each add-in folder." For example, if I create a registry string under HKLM\SOFTWARE\ESRI\Desktop10.1\Settings\AddInFolders called "D:\ArcGIS\AddIns", then any user running ArcMap on that computer will see any add-ins that have been placed in the D:\ArcGIS\AddIns folder as a Shared Add-In in ArcMap's Add-In Manager. The users will NOT be able to delete those add-ins using the Add-In Manager. Note: If you are running 64-bit Windows, the registry key will be under HKLM\SOFTWARE\Wow6432Node\ESRI\Desktop10.1\Settings\AddInFolders. Also, you may have to create the AddInFolders key yourself under Settings.
... View more
08-19-2013
10:15 AM
|
0
|
0
|
1149
|
POST
|
Is the problem with syncing tool changes between ArcCatalog and ArcMap going to be fixed in 10.1, too? Currently, if I change help documentation for a tool in ArcCatalog, I can't see those changes for the tool in ArcMap unless I quit out of ArcMap and restart it. Conversely, if I change the contents of a Toolbox in ArcMap, I can't see those changes in ArcCatalog unless I quit out of ArcCatalog and restart it. For tools that were created with ArcGIS 9.3.x, I've also found that there are documentation elements that I cannot get at in ArcGIS 10 to edit, even though they display when running the tool. For example, the original tool author inserted a graphic to illustrate a results parameter for a tool that was created in ArcGIS 9.3.x's Model Builder. That graphic shows up when the tool is run, but when I edit the tool's documentation, it's not there and I see no way to insert a graphic. Also, each of the model steps had a process description in ArcGIS 9.3.x, but all of those are gone or inaccessible in ArcGIS 10.0. (In ArcGIS 9.3.x's Model Builder, you could right-click on a tool and select Edit Description to insert text that explained what the processing was doing. I can't find anything remotely like this in ArcGIS 10.0.)
... View more
01-26-2012
05:09 AM
|
0
|
0
|
665
|
POST
|
The Production Mapping Toolbox is part of the Production Mapping product: http://www.esri.com/software/arcgis/extensions/production-mapping/index.html This particular toolbox isn't one of the basic toolboxes that are bundled with ArcGIS 10. Also, the Production Mapping solution has its own forum: http://forums.arcgis.com/forums/74-Esri-Production-Mapping
... View more
01-23-2012
12:54 PM
|
0
|
0
|
332
|
POST
|
How about trying it with Python, since it is a Python script? gp.CalculateField_management(TABLE, "texx", "str(!texx!).upper()", "PYTHON", "")
... View more
01-07-2011
01:17 PM
|
0
|
0
|
572
|
POST
|
What if you access the layers through the maps in the map document rather than the active view?
foreach (FileInfo fi in files)
{
IMapDocument pMapDoc = new MapDocumentClass();
if (pMapDoc.get_IsMapDocument(fi.FullName))
{
pMapDoc.Open(fi.FullName, null);
IMap pMap;
for (int i = 0; i <= pMapDoc.MapCount - 1; i++)
{
pMap = pMapDoc.get_Map(i);
IEnumLayer pEnumLayer = pMap.get_Layers(null, true);
pEnumLayer.Reset();
ILayer pLayer = pEnumLayer.Next();
while (pLayer != null)
{
IFeatureLayer pFtrLayer = pLayer as IFeatureLayer;
if (pFtrLayer != null)
{
IFeatureClass pFtrClass = pFtrLayer.FeatureClass;
if (pFtrClass != null)
{
IDataset pDataset = pFtrClass as IDataset;
if (pDataset != null)
{
\\pDataset.Name
\\pDataset.Workspace.PathName
}
}
}
pLayer = pEnumLayer.Next();
}
}
}
... View more
12-16-2010
07:47 AM
|
0
|
0
|
333
|
POST
|
You might also want to check the Geoprocessor Programming Model PDF on your system to see if it shows the "extra" properties or not: C:\Program Files\ArcGIS\Documentation\Geoprocessor_93.pdf
... View more
12-09-2010
02:45 PM
|
0
|
0
|
721
|
POST
|
Well, here is the online version of the ArcGIS Desktop 9.3 Help: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Describing_data On that page, under Describe Object properties, is a graphic that shows the properties for the Describe object. The Path property is the last one listed in the graphic. Beneath that graphic is a table that lists all of the properties with a short description. The Path property is the last one in that table. Also, you can look at this page, which should also be in your local Help: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Describe_Object_property My installed Help documentation matches what is on the website. However, I am running ArcGIS 9.3.1, and I see that both of these Help pages say that they were updated for 9.3.1. Maybe the 9.3 versions of these pages didn't include the Path property. Are you able to reference that property of the Describe object in your scripts? If you can, then I would expect it to appear in your Help documentation. If not, then this is all moot, eh?
... View more
12-09-2010
12:57 PM
|
0
|
0
|
721
|
POST
|
If you open ArcGIS Desktop Help and go to the Contents tab, you can find information about the Describe object and its properties under the following: Geoprocessing -> Automating your work with scripts -> Data properties and access when scripting -> Describing data The Geoprocessor Programming Model can be found as a PDF on your system at: C:\Program Files\ArcGIS\Documentation\Geoprocessor_93.pdf Also, Path is a property, not a method.
... View more
12-09-2010
05:00 AM
|
0
|
0
|
721
|
POST
|
Given a feature layer, your Python code could use Describe to find the path of the underlying data, and then parse that to determine if it's a file GDB, personal GDB, or something else. Kind of like the following. # Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
# Script arguments...
ftrLyr = sys.argv[1]
if ftrLyr == '#':
gp.AddError(" You must provide a feature layer.")
# Check to see if the input exists
if gp.Exists(ftrLyr):
desc = gp.Describe(ftrLyr)
ftrPath = desc.Path
ext = ftrPath.rpartition('.')[2] # Get part after last period.
ext = ext.lower()
if ext == "gdb":
gp.AddMessage(" Workspace is file geodatabase")
elif ext == "mdb":
gp.AddMessage(" Workspace is personal geodatabase")
else:
gp.AddMessage(" Workspace is directory based (shapefile, coverage, etc.)")
Incidentally, you might get some better responses if you asked this question over in the Python forum or the Geoprocessing forum.
... View more
12-08-2010
02:27 PM
|
0
|
0
|
721
|
POST
|
It's not a big deal to turn the Python script into a Script Tool, add it to a Toolbox, and then reference it in an ArcMap interface customization from the Toolbox. However, we have moved from a paradigm where you could have a VBA customization embedded within the MXD project file to one where, in order to do the exact same thing, you need to have at least two additional files: the Python script and the Toolbox. That changes deployment, and it adds the additional step of creating the Toolbox Script Tool. Having the tools in a Toolbox means that users can possibly run them outside of the environment that we want them to run them in... unless we spend additional time creating the tools to prevent that, which we wouldn't have to do if they were embedded directly into the MXD project. For us, this is mainly a transitional problem in going from an ArcGIS 9.x environment with embedded VBA code in a special MXD project to a world where users (with limited ArcGIS skills) are split between versions 9.x and 10, and you can't quite do things in the same manner between those two versions.
... View more
12-03-2010
10:47 AM
|
0
|
0
|
494
|
POST
|
Where are you running your Python script from? If you are running it in ArcMap and you've already made your selection, then you would pass the script your data as a Feature Layer parameter. For example, in the following, TestPolys is a Feature Layer parameter that has a selection on it. The first calculation is run on "CalcField" and only affects the selected features/records. That selection is then cleared and the second calculation is then run, affecting all of the layer's features/records. # Process: Calculate Field...
gp.CalculateField_management(TestPolys, "CalcField", FirstCalc, "PYTHON_9.3", "")
# Process: Select Layer By Attribute...
gp.SelectLayerByAttribute_management(TestPolys, "CLEAR_SELECTION", "")
# Process: Calculate Field (2)...
gp.CalculateField_management(TestPolys, "CalcField", SecondCalc, "PYTHON_9.3", "")
... View more
12-02-2010
01:13 PM
|
0
|
0
|
1515
|
POST
|
I have been unable to find a way to do this without using VBA or .NET. Of course, VBA is deprecated in ArcGIS 10, so you shouldn't base development on it. And if you are going to write code in .NET, then you might as well incorporate whatever it is that the Python scripting is doing into the .NET code. If there is a way to directly launch a Python script from an ArcMap interface button without first turning that script into a Script Tool in a toolbox, then I would also like to know how to do it, but I have combed through the help docs and been unable to discover a way to do this.
... View more
12-02-2010
12:46 PM
|
0
|
0
|
494
|
POST
|
In ArcMap 10, with the Customize dialog window open and the Commands tab active, at the very end of the Categories list there should be: [Geoprocessing Tools] [Menu] [New Menu] Do you not have those? If you have the "[Geoprocessing Tools]" category, you can select it and then Add a script tool from a Toolbox (Note: This tripped me up at first as I wanted to add the script directly from a Python file. AFAIK, you must first add the script to a Toolbox as a tool, and then you can add it into ArcMap as a custom tool from that Toolbox.). Once you've added that tool, you can drag its icon to a toolbar in the ArcMap interface. If you don't like the script-y icon, you can change it by right-clicking on the icon on the toolbar and either picking one of the standard images, or browsing for one. In any case, once you're out of Customize mode, clicking on your new button should run your script tool.
... View more
11-24-2010
07:31 AM
|
0
|
0
|
1011
|
POST
|
Does your parameter in the call to getSchool need to have the join table name in it? Something like "getSchool(!JoinTable.NAME!)"?
... View more
09-30-2010
02:42 PM
|
0
|
0
|
313
|
POST
|
Thanks, Steve! I took what you posted and modified it to work in ArcGIS 10 and do what I wanted. Following is what I came up with, in case it's of any use to others. (Incidentally, in your calls to RemoveJoin_management, you have "theInput", but I believe that should be "theInputTable".)
## =======================================================================
def RemoveAllJoins(theInputTable):
## Remove all joined tables.
try:
arcpy.AddMessage("Remove All Joins from " + theInputTable)
theJoinList = []
theDesc = arcpy.Describe(theInputTable)
if theDesc.DataType.upper() == "FEATURELAYER":
# If it's a shapefile, remove the extension from the name.
theFC = theDesc.Featureclass.Name.replace(".shp","")
else:
arcpy.AddMessage("\n ERROR: " + theInputTable + " is not a feature layer!\n")
return False
# Look at the fields for this layer. A full field name includes
# the table name, i.e., TABLE.FIELD, where TABLE matches the name
# of the feature class. However, if there is a Join on the table,
# the joined field names will be like JOINTABLE.FIELD, so we can
# look for those other table names which represent Joins.
theFields = theDesc.Fields
for theField in theFields:
FullName = theField.Name
# Get rid of spaces in field name components and split them into a list.
nameList = arcpy.ParseFieldName(FullName).replace(" ","").split(",")
theTableName = nameList[2]
if theTableName != theFC and not theTableName in theJoinList:
# Keep track of Joins that were removed; remove only once.
theJoinList.append(theTableName)
arcpy.AddMessage(" Removing join: " + theTableName)
arcpy.RemoveJoin_management(theInputTable, theTableName)
return True
except Exception as e:
arcpy.AddError(e.message)
return False
... View more
09-17-2010
01:30 PM
|
2
|
0
|
1337
|
Title | Kudos | Posted |
---|---|---|
1 | 09-16-2010 04:35 PM | |
2 | 09-17-2010 01:30 PM |
Online Status |
Offline
|
Date Last Visited |
08-21-2023
05:44 PM
|