POST
|
I just discover this through troubleshooting, it shouldn't be the default behavior. and i didn't find any indication when the last tag is parsed. You can also get your parser when you cast your text symbol to ITextParserSupport interface.
... View more
06-22-2016
11:53 PM
|
1
|
0
|
484
|
POST
|
Check the following posts, it may help. Error: ArcPy fails to import on a machine authorized for ArcGIS Server arcgis desktop - arcpy license: import arcserver is ignored at 10.3.1 - Geographic Information Systems Stack Exchange ArcGIS Desktop and ArcGIS Server lay down separate installs of the ArcPy module in their respective install locations. In addition, ArcGIS Desktop and ArcGIS Server place unique path configuration files (desktop.pth and server.pth) in the Lib\site-packages folder of the install location for Python. • Desktop.pth contains the path to the ArcGIS Desktop install for ArcPy. • Server.pth contains the path to the ArcGIS Server install for ArcPy. When ArcPy is imported as a result of the process described above, the path to the ArcGIS Desktop install of ArcPy is found first. When it is imported it attempts to find a license for ArcGIS Desktop and fails with the exception shown above.
... View more
06-21-2016
03:04 AM
|
1
|
1
|
517
|
POST
|
Hello Andrew, Just try to initialize your Text Symbol before calling Next Method like the following: ITextParser formattingTextParser = new SimpleTextParserClass();
Boolean bHasTags = false;
//Initialize your Text Symbol
formattingTextParser.TextSymbol = new TextSymbolClass();
formattingTextParser.Text = "<CLR red=\"255\" green=\"255\" blue=\"255\">My text</CLR>";
formattingTextParser.Reset();
formattingTextParser.HasTags(ref bHasTags);
if (bHasTags)
{
// At this point the textsymbol property is null on the text parser. Parse text formatting.
formattingTextParser.Next();
string formattedText = formattingTextParser.TextSymbol.Text;
} Cheers, Ahmed
... View more
06-21-2016
01:30 AM
|
0
|
2
|
484
|
POST
|
Hello Miriam, You can use Import Metadata tool through arcobjects as ImportXML class is not found anymore. private void ImportMetadata(string sourceMetadata, string targetMetadata, string importType = "FROM_ISO_19139",bool enableAutomaticUpdates=true)
{
IGeoProcessor gp = new GeoProcessor();
IVariantArray va = new VarArrayClass();
va.Add(sourceMetadata);
va.Add(importType);
va.Add(targetMetadata);
va.Add(Convert.ToString(enableAutomaticUpdates));
gp.Execute("ImportMetadata_conversion", va, null);
}
... View more
03-14-2016
03:41 AM
|
0
|
0
|
261
|
POST
|
Hi, If you have the polygon geometry you can cast it to ICurve interface and get its Length, something like the following: private double GetShapeLength(IGeometry geometry)
{
double geometryLength = 0;
if (geometry!=null&&geometry.GeometryType == esriGeometryType.esriGeometryPolygon)
{
ICurve curve = geometry as ICurve;
geometryLength= curve.Length;
}
return geometryLength;
}
... View more
03-14-2016
02:17 AM
|
1
|
0
|
278
|
POST
|
I can't find command property too but when I typed the property it works fine. ICommand pCommand = pItem.Command as ICommand; Then you can cast it to your type.
... View more
06-22-2015
03:20 AM
|
0
|
0
|
354
|
POST
|
Hi Anatolii, By doing some search I found this blog post which explaining how to Add Ellipse Geometry to graphics layer.
... View more
06-08-2015
04:29 AM
|
2
|
2
|
710
|
POST
|
local is a prefix to reference your assembly (which contains LocationLayer class) in your XAML. It should looks like xmlns:local="clr-namespace:YourAssembly" in your XAML. For more information about Applying XAML Namespace Attributes to Custom Assemblies. Also I attached a sample for location layer, I used Sliverlight API v3.0 on VS 2012.
... View more
06-02-2015
02:40 AM
|
0
|
0
|
395
|
POST
|
Hi Mohammed, You can use a server side solution (geoprocessing service) that converts your CAD file/layer to feature set and display it through your application. Also check this related post: https://community.esri.com/thread/20494 https://community.esri.com/thread/115887
... View more
05-04-2015
03:19 AM
|
1
|
0
|
279
|
POST
|
One optimization is to use arcpy.ValidateTableName to avoid any invalid feature class name as some characters like dash is not allowed. import arcpy
from arcpy import env
env.workspace = r"C:\Users\mohamed.abdelhamid\Desktop\Python\test\Egy_SubDistricts_rename.gdb"
fcs = arcpy.ListFeatureClasses()
fields = ["DIS_ARB_NA","SDIS_ARB_N"]
for fc in fcs:
with arcpy.da.SearchCursor(fc,fields) as cursor:
for row in cursor:
fullname= row[0] + row[1]
del row, cursor
print fullname
outfc = arcpy.ValidateTableName(fullname,env.workspace)
arcpy.Rename_management(fc, outfc, "FeatureClass")
... View more
03-25-2015
06:06 AM
|
0
|
0
|
224
|
POST
|
Check "Use Standardized Queries" for your layer through the rest map service directory first. It should be like "Use Standardized Queries: true" Also check documentation for Standardized Queries from 10.3 help.
... View more
03-24-2015
09:01 AM
|
1
|
1
|
482
|
POST
|
My first thought is to check whether Standardized Queries is enabled or not. If enabled the server will not allow the database-specific functions.
... View more
03-24-2015
07:57 AM
|
0
|
3
|
482
|
POST
|
You can develop a geoprocessing tool that converts the CAD file to Featureset for and display it on Map as a Graphics layer.
... View more
03-22-2015
06:50 AM
|
1
|
1
|
833
|
POST
|
By following the steps in this post I can run my ArcObjects code inside a python script from Arcmap, I just rewrite part of the disconnect snippet as a POC and tested it from Arcmap python window and from toolbox and it woks fine. def ArcCatalog_DisconnectSDEConnections():
GetDesktopModules()
pApp = GetCurrentApp()
import comtypes.gen.esriFramework as esriFramework
import comtypes.gen.esriCatalogUI as esriCatalogUI
import comtypes.gen.esriCatalog as esriCatalog
pGxApp = CType(pApp, esriCatalogUI.IGxApplication)
print pGxApp
pGxObj = pGxApp.SelectedObject
if not pGxObj:
print "Nothing selected."
return
pGxContainer = CType(pGxObj, esriCatalog.IGxObjectContainer)
if not pGxContainer:
print "No folder selected."
return
pgxEnum =CType(pGxContainer.Children,esriCatalog.IEnumGxObject)
gxObject =CType(pgxEnum.Next(),esriCatalog.IGxObject)
while gxObject:
gxDatabase = CType(gxObject,esriCatalog.IGxDatabase)
#print gxDatabase.IsConnected
if gxDatabase and gxDatabase.IsConnected:
gxDatabase.Disconnect()
print gxObject.FullName + " Disconnected"
gxObject =CType(pgxEnum.Next(),esriCatalog.IGxObject)
I'm using Arcmap 10.2.1, I added the code to the 10.2 snippets file and called it directly after importing the file. import arcpy
import sys
sys.path.append(r'FOLDER_CONTAINS_SNIPPET_FILE')
from Snippets import ArcCatalog_DisconnectSDEConnections
try:
ArcCatalog_DisconnectSDEConnections()
except:
arcpy.AddMessage(sys.exc_info()) You should check "Run Python script in process" checkbox in script properties to get it works. Hope this approach helps.
... View more
03-03-2015
08:18 AM
|
0
|
1
|
1002
|
POST
|
It seems that you are creating a new graphic layer for each graphic so you have 1000+ graphic layer on map. var marker= new esri.layers.GraphicsLayer();
var marker_icon = "http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=|C0C0C0|";
var s = new esri.symbol.PictureMarkerSymbol(marker_icon, 51, 51);
//TODO:Iterate through your data
map.addLayer(marker);
... View more
02-25-2015
06:02 AM
|
0
|
0
|
184
|
Title | Kudos | Posted |
---|---|---|
1 | 03-22-2015 06:50 AM | |
1 | 05-04-2015 03:19 AM | |
1 | 03-14-2016 02:17 AM | |
1 | 04-01-2014 10:01 PM | |
1 | 12-01-2014 01:28 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|