|
POST
|
Hi Matthew, If you created the layer file with Single Symbol symbology, new features should automatically display once the feature class is updated. You would only need to apply the code if you used Unique Values for the symbology. You can test this: 1. Add a feature class to ArcMap (symbology will default to Single Symbol) 2. Create a layer file 3. Remove the feature class and add the layer file to the MXD 4. Save the MXD 5. Start a new map document and add the feature class 6. Start an edit session, add a new feature, save edits 7. Open the previously saved MXD The new feature should appear.
... View more
12-27-2012
09:06 AM
|
0
|
0
|
5616
|
|
POST
|
Hi Matthew, You can simplify your code if you're updating a layer file in your MXD. Try the following using the Python window within ArcMap: import arcpy, os
from arcpy import env
env.workspace = os.getcwd()
mxd = arcpy.mapping.MapDocument(env.workspace + r"\CoastalCurrentsData.mxd")
df = arcpy.mapping.ListDataFrames(mxd)[0]
lyr = arcpy.mapping.Layer("RecentData")
lyr.symbology.addAllValues()
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
... View more
12-27-2012
06:41 AM
|
0
|
0
|
5616
|
|
POST
|
Here's an example on how to create a checkbox within the InfoWindow: infoTemplate = new esri.InfoTemplate("Building ID: ${BuidlingID}",
"<tr><b>Address:</b> <td>${Address}\
<br><br><input type='checkbox' id='check1' onchange='moreInfo()'>More info");
var dynamicLayer = new esri.layers.FeatureLayer(dynamicUrl, {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate: infoTemplate,
outFields: ["*"]
function moreInfo(){
if(document.getElementById("check1").checked==true){
.........additional code.........
} I'm not sure if this is exactly what you are looking, but let me know if it's not.
... View more
12-26-2012
06:21 AM
|
0
|
0
|
1288
|
|
POST
|
Hi Jamal, With a ArcSDE Personal license you are able to connect with three simultaneous users, and only one can be an editor. With Workgroup, you can connect with 10 simultaneous users and editors. Whether you are using Personal or Workgroup, Microsoft limits the use of SQL Server Express to one CPU (or core within a socket) and 1GB of RAM. The maximum database size for SQL Server 2005 or 2008 Express is limited to 4GB. The maximum database size for SQL Server 2008 Express R2 is 10GB. You will still be able to perform replication and versioning with ArcSDE Personal.
... View more
12-26-2012
03:37 AM
|
0
|
0
|
1285
|
|
POST
|
What type of file are you trying to create (i.e. text file)? Here's an example on how to create a text file: txt = open(r"C:\temp\data.txt", "w")
txt.close()
... View more
12-26-2012
03:26 AM
|
0
|
0
|
621
|
|
POST
|
Hi Adam, Can you send a screen shot of your Parameters tab within the Script properties?
... View more
12-26-2012
02:43 AM
|
0
|
0
|
2609
|
|
POST
|
Database version 661 means that the database was from a SQL Server 2008 R2 instance, where version 655 means SQL Server 2008 instance. You'll need to upgrade to the R2 version in order to attach the database.
... View more
12-21-2012
10:34 AM
|
0
|
0
|
1407
|
|
POST
|
Are you trying to add a checkbox to the legend to toggle a layer on/off? Here's an example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>
</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" />
<script type="text/javascript">
var djConfig = {
parseOnLoad: true
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2"></script>
<style type="text/css" media="screen">
html, body {
height: 100%; width: 100%; margin: 0;
}
body{
background-color:white; overflow:hidden;
font-family: "Trebuchet MS";
}
#header {
background-image: url(../images/banner.jpg); background-repeat: repeat-x;
margin: 2px;
border: solid 4px #224a54;
color:white; font-size:18pt;
text-align:left; font-weight:bold; height:70px;
}
#subheader {
font-size:small;
color:white;
padding-left:20px;
}
#rightPane{
background-color:white;
color:#3f3f3f;
border: solid 2px #224a54;
width:20%;
}
#leftPane{
margin: 5px;
padding:2px;
background-color:white;
color:#3f3f3f;
border: solid 2px #224a54;
width:20%;
}
#map {
margin: 5px;
border:solid 4px #224a54;
-moz-border-radius: 4px;
}
#footer {
margin: 2px;
border: solid 2px #224a54;
background-color:#ecefe4;color:#3f3f3f;
font-size:10pt; text-align:center; height:40px;
}
.dijitTabInnerDiv{
background-color:#ecefe4;
}
#tabs{
padding:5px;
}
</style>
<script type="text/javascript">
dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("dijit.layout.TabContainer");
dojo.require("esri.dijit.Legend");
dojo.require("esri.layers.FeatureLayer");
dojo.require("dijit.form.CheckBox")
var map;
function init() {
var initialExtent = new esri.geometry.Extent({"xmin":-8396836.868209211,"ymin":4835062.442691721,"xmax":-8328196.416809216,"ymax":4891396.53253782,"spatialReference":{"wkid":102100}});
map = new esri.Map("map", {
extent: initialExtent
});
dojo.connect(map, 'onLoad', function (map) {
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
});
var basemapUrl = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer";
var referenceUrl = "http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer";
var dynamicUrl = "http://services.arcgis.com/Fz6BBJUji5ArUSDM/arcgis/rest/services/Service_Requests/FeatureServer/0";
var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapUrl);
var dynamicLayer = new esri.layers.FeatureLayer(dynamicUrl);
var referenceLayer = new esri.layers.ArcGISTiledMapServiceLayer(referenceUrl);
var legendLayers = [];
legendLayers.push({ layer: dynamicLayer, title: "Service Requests" });
dojo.connect(map, 'onLayersAddResult', function (results) {
//add the legend
var legend = new esri.dijit.Legend({
map: map,
layerInfos: legendLayers,
arrangement: esri.dijit.Legend.ALIGN_RIGHT
}, "legendDiv");
legend.startup();
});
map.addLayer(basemap);
map.addLayers([dynamicLayer, referenceLayer]);
dojo.connect(map, 'onLayersAddResult', function (results) {
//add check boxes
dojo.forEach(legendLayers, function (layer) {
var layerName = layer.title;
var checkBox = new dijit.form.CheckBox({
name: "checkBox" + layer.layer.id,
value: layer.layer.id,
checked: layer.layer.visible,
onChange: function (evt) {
var clayer = map.getLayer(this.value);
clayer.setVisibility(!clayer.visible);
this.checked = clayer.visible;
}
});
//add the check box and label to the toc
dojo.place(checkBox.domNode, dojo.byId("toggle"), "after");
var checkLabel = dojo.create('label', { 'for': checkBox.name, innerHTML: layerName }, checkBox.domNode, "after");
dojo.place("<br />", checkLabel, "after");
});
});
}
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<div id="mainWindow" dojotype="dijit.layout.BorderContainer" design="headline"
gutters="false" style="width:100%; height:100%;">
<div id="header" dojotype="dijit.layout.ContentPane" region="top">
<div id="subheader"></div>
</div>
<div dojotype="dijit.layout.ContentPane" id="leftPane" region="left">
<div dojotype="dijit.layout.TabContainer" >
<div dojotype="dijit.layout.ContentPane" title = "Legend" selected="true">
<div id="toggle"></div>
<div id="legendDiv"></div>
</div>
<div dojotype="dijit.layout.ContentPane" title="Tab 2" >
</div>
</div>
</div>
<div id="map" dojotype="dijit.layout.ContentPane" region="center">
</div>
<div id="footer" dojotype="dijit.layout.ContentPane" region="bottom" >
</div>
</div>
</body>
</html>
... View more
12-21-2012
10:12 AM
|
0
|
0
|
1288
|
|
POST
|
Hi Jamal, Does the directory "C:\student\Class_data_files" exist on your database server? If it doesn't, specify another location to store the .MDF in the Attach Databases dialog.
... View more
12-21-2012
08:57 AM
|
0
|
0
|
1407
|
|
POST
|
Thanks for the replies. Let me clarify my points further: 1. The Question is: what's the point of 3-tier architecture (if you upgrade to 10.1), since all connections Hits are going directly to the database SDE System Tables ?!! 2. Concerning shutting down connections, i know that you can do that in 10.1 using the new geodatabase administration tool (this is process killing not shutting down). but how can i totally block connections to the geodatabse ?? (by the way map-services usually try to re-establish connections after killing it). 3. i don't see any clear documentation in ESRI regarding geodatabase logs in 2-tier setup for ArcGIS 10.1 , what you have provided is for 9.2 release. they should mention it in their documentation in 10.1 !! Regards, 1. With the 3-tier architecture, the ArcSDE functionality takes place on the SDE server. The direct-connect architecture moves ArcSDE functionality to the desktop. This removes the ArcSDE load from the SDE server and allows additional resources to be freed up for the DBMS, which means you get better scalability on the database server. Direct connections can be faster if the server is heavily used, because processing takes place on the client machine. Rather than having to process the information on the server, which may be responding to requests from numerous other users at the same time, and send the information back to the client across the network, the client computer is typically only processing a few tasks at a time. One scenario where you may want to use an ArcSDE application server connection is if your desktop machine does not have enough resources to handle the ArcSDE processes. 2. You can block connections to the geodatabase following the steps here. 3. Here are some links, depending on your database, pertaining to log files: SQL Server Oracle PostgreSQL
... View more
12-21-2012
07:53 AM
|
0
|
0
|
2191
|
|
POST
|
Hi, 1. how can i shutdown all connections coming to my geodatabase system ? previously, using ArcSDE as an application server we used (sdemon -o shutdown) command. You can easily disconnect users using the Connections tab within the Administer Geodatabase > Administration. More information can be found here.
... View more
12-21-2012
03:37 AM
|
0
|
0
|
2191
|
|
POST
|
Hi Ralph, Try the following: 1. Share the following directory on your ArcGIS Desktop server: c:\Program Files\ArcGIS\Desktop10.0 2. Copy the Desktop10.pth to the python26\Lib\site-packages on your ArcSDE server 3. Edit the paths in the Desktop10.pth file to include UNC paths. Ex: \\servername\Program Files\ArcGIS\Desktop10.0\arcpy \\servername\Program Files\ArcGIS\Desktop10.0\bin or, if you only shared the Desktop10.0 folder and not the Program Files folder it would be: \\servername\Desktop10.0\arcpy \\servername\Desktop10.0\bin 4. Create an environment variable on your ArcSDE server called PYTHONPATH and set this to the path of the Desktop10.pth file on your ArcSDE server Check if you are able to run the script on your ArcSDE server after these steps.
... View more
12-21-2012
02:56 AM
|
0
|
0
|
1118
|
|
POST
|
Try installing Service Pack 1 and see if you receive the same error. If you do, try recreating the mosaic dataset in a new File Geodatabase, and then try creating your overviews.
... View more
12-21-2012
01:43 AM
|
0
|
0
|
3799
|
|
POST
|
Hi Kelly, Here is an example I was able to get to work with the dojox.grid.DataGrid:
//create Identify and Clear buttons to start/stop identifying features
function createButtons(){
toolBar = new esri.toolbars.Draw(map);
button1 = new dijit.form.Button({
id: "identifyButton",
showLabel: true,
checked: false,
label: "Identify",
onClick: function(){
toolBar.activate(esri.toolbars.Draw.POINT);
dojo.connect(featureLayer, "onClick", populateGrid)
},
}).placeAt(dojo.byId("buttons"));
button2 = new dijit.form.Button({
id: "clearButton",
showLabel: true,
checked: false,
label: "Clear",
onClick: function(){
clear();
},
}).placeAt(dojo.byId("buttons"));
}
//populate grid in left pane
function populateGrid(evt){
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map, evt.mapPoint, 4);
//select features based on map click
featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW, function(features, selectionMethod){
var items = dojo.map(features,function(feature){
return feature.attributes;
});
var data = {
identifier:"objectid",
items:items};
//add attributes to grid
store = new dojo.data.ItemFileReadStore({data:data});
var grid = dijit.byId("grid");
grid.setStore(store);
});
}
//retrieve extent of map click
function pointToExtent(map, point, toleranceInPixel) {
var pixelWidth = map.extent.getWidth() / map.width;
var toleraceInMapCoords = toleranceInPixel * pixelWidth;
return new esri.geometry.Extent( point.x - toleraceInMapCoords,
point.y - toleraceInMapCoords,
point.x + toleraceInMapCoords,
point.y + toleraceInMapCoords,
map.spatialReference );
}
//clear grid
function clear(){
toolBar.deactivate();
featureLayer.clearSelection()
var items = "";
var data = {
identifier:"",
items:items}
store = new dojo.data.ItemFileReadStore({data:data});
var grid = dijit.byId('grid');
grid.setStore(store);
}
... View more
12-20-2012
06:35 AM
|
0
|
0
|
693
|
|
POST
|
Hi Judy, Does this only occur when executing the Geoprocessing tool through your web application? I tested this with an 10.1 SP1 SDE feature class using the Export to CAD tool, but could not reproduce. I was able to successfully export the features from the child version.
... View more
12-20-2012
03:19 AM
|
0
|
0
|
1196
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 4 | 05-07-2020 05:14 PM | |
| 1 | 03-25-2026 04:16 AM | |
| 1 | 03-16-2026 01:00 PM | |
| 1 | 12-22-2025 10:39 AM |
| Online Status |
Online
|
| Date Last Visited |
Friday
|