POST
|
I am setting up a map with a series of point features, the feature table holds various fields including an image URL. I have successfully setup up the Configure Pop-up for the layer which works fine in the browser and on the older ArcGIS app. But in the newer ArcGIS Explorer for iPad I get the message No Image Unable to load image. I have tested the link by just inserting it via the custom attribute display and that works fine. Any help most appreciated, Owain.
... View more
04-28-2015
01:08 AM
|
1
|
2
|
2973
|
POST
|
Thanks Mark we will trial it as it is and hope that this feature is enhanced later on with the ability to customise the return results on the iPads. Owian
... View more
03-11-2015
01:25 AM
|
0
|
0
|
563
|
POST
|
Hi Mark, I am using the a couple different geolocator as part of a composite geolocator, all but one work fine as they should only return a few results. The one that I am having issues with is an address locator, where a surname is searched but only 12 are returned on the iPad. I would be happy if on the iPad you could view further results but there does not seem to be any way of achieving this. Owain
... View more
03-09-2015
01:48 AM
|
0
|
2
|
563
|
POST
|
Hi All, I have created a custom GeoLocator for our organization, which works fine on both Desktop, browser and iPad. But the number of results returned on the iPad seems to be limited to12, in both ArcGIS and Explorer for iPad, on the browser you can click view "Not what you wanted" to view the full list. Is there a way to change this limit? Cheers, Owain
... View more
03-06-2015
02:14 AM
|
0
|
4
|
4022
|
POST
|
Hi Said, If you want to use the script for both Shapefiles and Geodatabases, you will need to check the input dataset for which data type it is. As at the moment you are appending ".shp" to the name which is invalid for the Geodatabases. You can access which data type is input via the Describe function as seen here http://resources.arcgis.com/en/help/main/10.2/index.html#//018v0000002v000000 Hope that helps, Owain
... View more
03-04-2015
07:52 AM
|
0
|
2
|
810
|
POST
|
For those that are interested, I have managed to get this working. Although I ended up getting the Blob data directly from the table and not relying on the IAttachmentManager to retrieve it for me. ITableAttachments attachTable;
attachTable = new ITableAttachmentsProxy(pFeatureClass);
IAttachmentManager attachMan = attachTable.getAttachmentManager();
ILongArray IdArray = new LongArray();
IdArray.add(OID);
IEnumAttachment attachEnum = attachMan.getAttachmentsByParentIDs(IdArray, true);
attachEnum.reset();
IAttachment attach = attachEnum.next();
ArrayList<String> imgList = new ArrayList<String>();
while (attach != null){
String aPath = System.getenv("TEMP")+attach.getName();
IDataset pDataset = (IDataset) pFeatureLayer;
String tablePath = pDataset.getWorkspace().getPathName();
IWorkspaceFactory pWorkspaceFact = new FileGDBWorkspaceFactory();
IWorkspace pWorkspace = pWorkspaceFact.openFromFile(tablePath, 0);
IFeatureWorkspace pFtWorkspace = (IFeatureWorkspace) pWorkspace;
ITable pTable = pFtWorkspace.openTable(pDataset.getBrowseName()+"__ATTACH");
IRow pRow = pTable.getRow(attach.getAttachmentID());
IMemoryBlobStream memoryBlobStream = (IMemoryBlobStream) pRow.getValue(5);
memoryBlobStream.saveToFile(aPath);
} Hope this is some help to other people, Owain
... View more
02-26-2015
07:38 AM
|
0
|
1
|
543
|
POST
|
Hi Erin, That unfortunately using a folder or full path string does not work either As far as I can tell the IAttachment.getData() is not retrieving the blob data into the IMemoryBlobStream hence the NULL pointer. As any attempt to get information on the IMemoryBlobStream fails as its is NULL. I will try and use the snippet mentioned to see if that works, Owian
... View more
02-26-2015
02:02 AM
|
0
|
0
|
543
|
POST
|
Hi All, I have written a Java addin tool to open all attachments on a point feature in the PCs default image viewer. I was using the Working with Attachments, ArcObjects Help for .NET developers , as a starting example to achieve this. But when I use the code snippet below, it successfully loops through all the attachments reading the name ITableAttachments attachTable;
attachTable = new ITableAttachmentsProxy(pFeatureClass);
IAttachmentManager attachMan = attachTable.getAttachmentManager();
ILongArray IdArray = new LongArray();
IdArray.add(OID);
IEnumAttachment attachEnum = attachMan.getAttachmentsByParentIDs(IdArray, true);
attachEnum.reset();
IAttachment attach = attachEnum.next();
while (attach != null){
System.out.printf("%s,: %s\n", attach.getAttachmentID(), attach.getName() );
IMemoryBlobStream memBlob = attach.getData();
memBlob.saveToFile(attach.getName());
attach = attachEnum.next();
} But it fails to save the IMemoryBlobStream to file with the error, java.lang.NullPointerException which implies the blob data was not retrieved from the attachment table. Any pointer on where I am going wrong would be much appreciated, Owain
... View more
02-25-2015
04:22 AM
|
0
|
4
|
4127
|
POST
|
Afternoon Peter, As Dan mentioned above, the use of CURRENT instead of a file path would mean that the Python script will edit the current ArcMap session, where as if you specify the file path the Python script will open a new session, hence the locks errors your were getting as you had the MXD already open. You can read more here http://resources.arcgis.com/en/help/main/10.2/index.html#//00s30000000r000000 MapDocument Example 1 If you have a the MXD open in ArcMap and want to run a script on its contents use CURRENT MapDocument Example 2 If you want to run the script independently you specifiy te full File Path Owain
... View more
02-19-2015
05:59 AM
|
2
|
0
|
1155
|
POST
|
Hi Peter, You are missing just the last step, saving the MXD when you have finished editing the layers. So your code should read. import arcpy
mxd = arcpy.mapping.MapDocument(r"Y:\TRUTTA\Trutta_new\TruttaMaps\test.mxd")
for lyr in arcpy.mapping.ListLayers(mxd, "*"):
if lyr.name == "chimney_p":
lyr.definitionQuery = """"Trutta_Map" = '19A4'"""
mxd.save() Hope that helps, Owain
... View more
02-19-2015
12:27 AM
|
2
|
2
|
1155
|
POST
|
Have a look at the ArcObjects SDK for Java http://help.arcgis.com/en/sdk/10.0/java_ao_adf/conceptualhelp/engine/index.html#/ArcGIS_Desktop_customizations_using_add_ins/00010000042z000000/ or here http://resources.arcgis.com/en/help/arcobjects-java/concepts/engine/#/Simple_Add_In/00010000061m000000/ Its has examples of creating an Add-In in Java. Owain
... View more
01-09-2015
07:34 AM
|
0
|
0
|
612
|
POST
|
Morning Terence, Here is how I am querying a feature in a layer and then zooming to it. You will need to pass the layer name and search string for the IQueryFilter to match your layer feaure properties. public void listPerformZoom(String layerName, String searchString) throws AutomationException, IOException{
Map map = (Map)mxDocument.getFocusMap();
IFeatureLayer pLayer = null;
IActiveView pActiveView = (IActiveView) map;
try {
map.clearSelection();
} catch (AutomationException e1) {
e1.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}
try{
pLayer = (IFeatureLayer) gpUtils.findMapLayer(layerName);
} catch(AutomationException e){}
if (pLayer != null){
IFeatureSelection featureSelection = (IFeatureSelection) pLayer;
if (featureSelection != null){
IQueryFilter pQF = new QueryFilter();
String query = String.format("RECORD_KEY = '%s'", searchString); // Search Query String
pQF.setWhereClause(query);
featureSelection.selectFeatures(pQF, esriSelectionResultEnum.esriSelectionResultNew, true);
pActiveView.partialRefresh(esriViewDrawPhase.esriViewGeoSelection, pLayer, null);
MapSelection pMapSel = new MapSelection(map.getFeatureSelection());
pMapSel.reset();
IFeature pFeature = pMapSel.next();
IGeometry pGeom = pFeature.getShape();
IEnvelope pEnv;
if (pGeom instanceof IPoint){
pEnv = pGeom.getEnvelope();
pEnv.expand(100, 100, false); // This is the extent of the zoom if a point feature is found
pActiveView.setExtent(pEnv);
} else {
pEnv = pGeom.getEnvelope();
pActiveView.setExtent(pEnv);
}
pActiveView.refresh();
}
featureSelection = null;
}
} Hope that helps, Owain
... View more
01-08-2015
12:49 AM
|
0
|
2
|
612
|
POST
|
You might want to have a look at this https://community.esri.com/thread/19758, as there was a bug with Java and Add-Ins meaning JTextFields are disabled. You can use a JOptionPane to grab the search text. But I created a similar Add-In tool by using a Model View Controller. Example here https://community.esri.com/thread/67843 Owain
... View more
01-07-2015
08:11 AM
|
0
|
4
|
612
|
POST
|
You need to build the substitution string correctly to use with the format string function. https://docs.python.org/2/library/functions.html#format e.g. Expression = "(!g_cm2_yr! / {0})*({1}/{2})".format(arcpy.GetParameterAsText(1),float(arcpy.GetParameterAsText(2))/100, 1-float(arcpy.GetParameterAsText(2)/100))
... View more
12-18-2014
03:10 AM
|
2
|
2
|
1004
|
POST
|
Cheers Mark Brilliant that's was all it needed, I swear I had tried turning that on and off before. Owain
... View more
09-24-2014
12:41 AM
|
0
|
0
|
1515
|
Title | Kudos | Posted |
---|---|---|
1 | 10-26-2017 01:06 AM | |
1 | 10-26-2017 06:09 AM | |
1 | 08-15-2017 03:32 AM | |
1 | 04-28-2015 01:08 AM | |
2 | 02-19-2015 05:59 AM |
Online Status |
Offline
|
Date Last Visited |
02-27-2023
06:27 AM
|