At v10 there is a very Arcpy way of getting the installation directory for ArcGIS Desktop. It's very easy and it goes as follows:
Now we want to see what software is installed on the machine:
You'll ge a list of software installed on the machine.
Happy Coding!
Friday, December 3, 2010
Thursday, October 28, 2010
Dynamic Label Tip
When working with data driven pages, you might want to put the adjacent grid cells on the page layout. What happens is the cell is empty? By default, the value "[EMPTY]" will appear, which is not very pleasing. To get around this issue, there is a property called emptystr. If you set the emptystr=" " you will see nothing instead of "[EMPTY]."
Code sample below:
Code sample below:
< dyn emptystr=" " property="PageNumber_E" type="page" >
Tuesday, October 26, 2010
Assigning Alias to Custom Toolboxes
I create lots of custom scripts and toolboxes to help out with various tasks, and I noticed the following message the other day when I exported a script from model builder to python:
# Warning: the toolbox toolbox.tbx DOES NOT have an alias.
# Please assign this toolbox an alias to avoid tool name collisions
# And replace arcpy.gp.toolname(...) with arcpy.toolname_ALIAS(...)
Basically, the system is asking for an Alias to provide an additional unique identifier because tools within the same toolbox cannot have the same name, but tools in other toolboxes can have the same name.
To define an alias, open ArcCatalog and right click on the tbx file. Select properties, you'll see this:
That easy!
Enjoy
# Warning: the toolbox toolbox.tbx DOES NOT have an alias.
# Please assign this toolbox an alias to avoid tool name collisions
# And replace arcpy.gp.toolname(...) with arcpy.toolname_ALIAS(...)
Basically, the system is asking for an Alias to provide an additional unique identifier because tools within the same toolbox cannot have the same name, but tools in other toolboxes can have the same name.
To define an alias, open ArcCatalog and right click on the tbx file. Select properties, you'll see this:
Enter in an alias and press ok.That easy!
Enjoy
Monday, October 11, 2010
Friday, October 8, 2010
Alternate Access Mapping for SharePoint
Alternate Access Mapping enables you to access your Sharepoint site via a typical URL like http://mysharepoint.com instead of hitting the server name at http://mysharepointserver. In combination with DNS A host entries you can also define URLs like http://mysite.mysharepoint.com even though your My Site web application is hosted on a different port.
Let's start:
Let's start:
- Go to Central Administration
- Click on the Operations Tab
- Click on Alternate Access Mappings under Global Configuration
- You should now see a list of your web applications, switch over to the one you want to map to the new URL by selecting it from the drop down on the right side.
- Click on Edit Public URLs and change the desired zone URL type to your new domain name. You can also change your internal URLs also by clicking Add Internal URLs.
- Now you’ll have to switch over to your DNS server.
- Within the DNS Management Console and Under Forward Look up Zones:
- Add a new Primary Zone with your new domain name.
- Add a new Host (A) to the records and point the IP Address to the SharePoint server.
Enjoy
Labels:
Sharepoint
SharePoint 2007 - Enable Anonymous Access
1). To enable anonymous on the IIS web site do the following:
You can confirm that anonymous access is enabled by going back into the IIS console and checking the Directory Security properties.
2). Enable anonymous access in the site.
A couple of notes about anonymous access:
- Launching Internet Information Services Manager from the Start -> Administration Tools menu
- Select the web site, right click and select Properties
- Click on the Directory Security tab
- Click on Edit in the Authentication and access control section
- First get to your portal. Then under “My Links” look for “Central Administration” and select it.
- In the Central Administration site select “Application Management” either in the Quick Launch or across the top tabs
- Select “Authentication Providers” in the “Application Security” section
- Click on the “Default” zone (or whatever zone you want to enable anonymous access for)
- Under “Anonymous Access” click the check box to enable it and click “Save”
You can confirm that anonymous access is enabled by going back into the IIS console and checking the Directory Security properties.
2). Enable anonymous access in the site.
- Return to your sites home page and navigate to the site settings page. In MOSS, this is under Site Actions – Site Settings – Modify All Site Settings. In WSS it’s under Site Actions – Site Settings.
- Under the “Users and Permissions” section click on “Advanced permissions”
- On the “Settings” drop down menu (on the toolbar) select “Anonymous Access”
- Select the option you want anonymous users to have (full access or documents and lists only)
A couple of notes about anonymous access:
- You will need to set up the 2nd part for all sites unless you have permission inheritance turned on
- If you don’t see the “Anonymous Access” menu option in the “Settings” menu, it might not be turned on in Central Admin/IIS. You can manually navigate to “_layouts/setanon.aspx” if you want, but the options will be grayed out if it hasn’t been enabled in IIS
- You must do both setups to enable anonymous access for users, one in IIS and the other in each site
Labels:
Sharepoint
Thursday, October 7, 2010
Searching Esri ArcObject Help With Google
Here is a great tip I've picked up over the last couple of months. When working with the online help system for ArcObjects, you can sometimes get tons of search results for unrelated topics. For example, say you search Point or Polygon, you will get about 10,000 results from the forums, other help topics. It's basicly information overload!
Let's say you need to search the .NET ArcObjects help, so to streamline the search process, you can utilize Google's search engine by doing the following:
Let's say you need to search the .NET ArcObjects help, so to streamline the search process, you can utilize Google's search engine by doing the following:
- In order for google to work, you need the site. For this example, we will use http://help.arcgis.com/en/sdk/10.0/arcobjects_net/ao_home.html. You can to remove the http:// and the ao_home.html for your site reference.
- The result should be this: help.arcgis.com/en/sdk/10.0/arcobjects_net
- With our site in hand, navigate to google (http://www.google.com/) and create a new search entry as follows: "site:help.arcgis.com/en/sdk/10.0/arcobjects_net TEST"
- Copy the resulting URL and ignore the search results
- Go to: http://www.microsoft.com/windows/ie/searchguide/en-en/default.mspx
- Paste the resulting Google Search URL into the URL box
- Give it a descriptive name. Ex: Search .NET ArcObjects
- Click install
Labels:
.Net,
ArcObjects
Subscribe to:
Posts (Atom)