|
POST
|
Hi, Another way is to write standalone application using ArcGIS Pro CoreHost library. Using VBA you can start new process with your standalone application, write results to file and read result file when process finishes. How to start process you can find here: https://stackoverflow.com/questions/20917355/how-do-you-run-a-exe-with-parameters-using-vbas-shell
... View more
12-20-2021
06:37 AM
|
0
|
0
|
1472
|
|
POST
|
Hi, You can serialize ISpatialReference object to xml ant then read wkt from it. Code for serialization: private static string GetSpatialReferenceAsXmlString(ISpatialReference spatialReference)
{
if (spatialReference == null) throw new ArgumentNullException("spatialReference");
var xmlStream = new XMLStreamClass();
var xmlWriter = new XMLWriterClass();
var xmlSerializer = new XMLSerializerClass();
xmlWriter.WriteTo(xmlStream);
xmlSerializer.WriteObject(xmlWriter, null, null, string.Empty, string.Empty, spatialReference);
return xmlStream.SaveToString();
} You will get xml like this: <ProjectedCoordinateSystem xsi:type='typens:ProjectedCoordinateSystem' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.8'>
<WKT>PROJCS["LKS_1994_Transverse_Mercator",GEOGCS["GCS_LKS_1994",DATUM["D_Lithuania_1994",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",24.0],PARAMETER["Scale_Factor",0.9998],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]</WKT>
<XOrigin>-22523120044.116333</XOrigin>
<YOrigin>-22527998119.405388</YOrigin>
<XYScale>18181.818166159173</XYScale>
<ZOrigin>-100000</ZOrigin>
<ZScale>10000</ZScale>
<MOrigin>-100000</MOrigin>
<MScale>10000</MScale>
<XYTolerance>0.001</XYTolerance>
<ZTolerance>0.001</ZTolerance>
<MTolerance>0.001</MTolerance>
<HighPrecision>true</HighPrecision>
</ProjectedCoordinateSystem> Then read WKT node from it
... View more
12-17-2021
01:02 AM
|
0
|
0
|
3406
|
|
POST
|
Hi, Have you set devexpress dlls references "Copy Local" property to true?
... View more
12-16-2021
03:16 AM
|
0
|
1
|
1430
|
|
POST
|
Hi, Your post is in the wrong thread. You need this: https://community.esri.com/t5/arcgis-pro-sdk/ct-p/arcgis-pro-sdk . Check in Visual Studio file properties window "Build action" setting of AddInDesktop16.png. It must be set to "AddInContent"
... View more
12-14-2021
10:30 PM
|
0
|
1
|
1819
|
|
POST
|
I make test with ArcGIS Pro sample project : https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Framework/CustomCategories Added two buttons to ExtraReport1 daml: <button id="ExtraReport1_ButtonBefore" caption="ButtonBefore" className="ButtonBefore" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png">
<tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
</button>
<button id="ExtraReport1_ButtonAfter" caption="ButtonAfter" className="ButtonAfter" loadOnClick="true" smallImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue16.png" largeImage="pack://application:,,,/ArcGIS.Desktop.Resources;component/Images/GenericButtonBlue32.png">
<tooltip heading="Tooltip Heading">Tooltip text<disabledText /></tooltip>
</button> Then update main module : <updateModule refID="CustomCategoriesExample_Module">
<groups>
<updateGroup refID="CustomCategoriesExample_Group1">
<insertButton refID="ExtraReport1_ButtonBefore" insert="before" placeWith="CustomCategoriesExample_Ribbon_ShowReports"/>
<insertButton refID="ExtraReport1_ButtonAfter" insert="after" placeWith="CustomCategoriesExample_Ribbon_ShowReports"/>
</updateGroup>
</groups>
</updateModule> All other stuff dependencies and autoload settings were in solution from beginning. And result: GintautasKmieliauskas_0-1639491674381.png
... View more
12-14-2021
06:21 AM
|
1
|
0
|
4683
|
|
POST
|
Hi, You need to combine both techniques: dependencies and insertTool/insertButton settings. Our projects contains more than 10 add-ins with about 50 tools/buttons and there is no problem with setting order in tabs, groups and etc. At first you need to setup correctly add-in dependencies (using the same order as with your numbers). Set that ETAKotsing depends XParing and etc. "Insert" setting could have "before" value not only "after" Your first XParing module must have autoLoad="true", other modules autoLoad="false"
... View more
12-14-2021
05:23 AM
|
1
|
2
|
4694
|
|
POST
|
Hi, You can specify order of tools using insertTool/insertButton settings: <insertTool refID="xxxxx_yyyyy" insert="after" placeWith="aaaaa_bbbbb" /> P.s. It works with insertGroup too.
... View more
12-14-2021
12:56 AM
|
1
|
4
|
4705
|
|
POST
|
To get one layer you need to use List methods FirstOrDefault or First and you will get one layer: var myLayer = map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(x => string.Compare(x.Name, "MyLayer", true) == 0).FirstOrDefault(); Each enumerable you can convert to list using ToList() method. Then you can use all List class methods . Using foreach syntax you can go through list members: var allFeatLayers = map.GetLayersAsFlattenedList().OfType<FeatureLayer>().ToList();
foreach (var layer in allFeatLayers)
{
// Do something with layer
}
... View more
12-13-2021
09:21 AM
|
0
|
0
|
2162
|
|
POST
|
Hi, It's very simple in ArcGIS Pro too. For example you need only feature layers: var featLayers = map.GetLayersAsFlattenedList().OfType<FeatureLayer>(); More useful things you can do with linq (do not forget add using System.Linq;) For example you need to get all feature layers which are named "MyLayer": var myLayers = map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(x => string.Compare(x.Name, "MyLayer", true) == 0); Next one all polygon type layers: var polygonLayers = map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(
l => l.ShapeType == esriGeometryType.esriGeometryPolygon).ToList();
... View more
12-13-2021
07:14 AM
|
0
|
2
|
2171
|
|
POST
|
Hi, It is enough to make changes only in last add-in you created. Define dependencies in new add-in config.daml on other add-ins using dependencies section: <dependencies>
<!-- id of "Add-in B" same as AddInInfo id="{00000000-0000-0000-0000-000000000000}"-->
<dependency name="{00000000-0000-0000-0000-000000000000}" />
</dependencies> Then in updateModule section define where you want to see your new tools commands in existing tabs/groups of your other add-ins. As in your sample. More info about dependencies here: https://www.esri.com/content/dam/esrisites/en-us/about/events/media/UC-2019/technical-workshops/tw-6162-470.pdf
... View more
12-13-2021
04:11 AM
|
1
|
0
|
4759
|
|
POST
|
Hi, Referring to the article SQL reference for query expressions used in ArcGIS your query must be like this: df_crash = item_crash.layers[0].query(where="REPORTDATE = date '2010-12-17 05:00:00'").sdf
... View more
12-12-2021
10:30 PM
|
0
|
0
|
2323
|
|
POST
|
Hi, Your code is based on ArcObjects. It cant' work on ArcGIS Pro.
... View more
12-12-2021
10:13 PM
|
0
|
2
|
1453
|
|
POST
|
Hi, The faster way is not using EditOperation as I wrote in my first post and use in_memory featureclass instead of shapefile, Another alternative is to use InsertCursor . @RichRuh knows more about results as he commented that post.
... View more
12-10-2021
05:42 AM
|
0
|
0
|
4066
|
|
POST
|
You can add one line of code to your add-in to check what is your database wildcard symbol is. string wildChar = geodatabase.GetSQLSyntax().GetSpecialCharacter(SQLSpecialCharacter.WildcardManyMatch);
... View more
12-09-2021
06:03 AM
|
0
|
1
|
3136
|
|
POST
|
Hi, What kind of database do you use for querying? On enterprise database and FGDB it works, on shape file doesn't. P.s. After restart of ArcGIS Pro it works on shapefile too.
... View more
12-09-2021
05:53 AM
|
0
|
3
|
3141
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 1 | 07-21-2026 10:23 PM | |
| 1 | 06-30-2026 10:14 PM | |
| 1 | 06-30-2026 01:43 PM | |
| 2 | 04-24-2026 08:33 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|