POST
|
Is there any way to get access to the page icons used in the new layout gallery?. We are creating a custom layout add-in and wanted to have icons representing the 4 page sizes circled below: Thanks.
... View more
10-04-2018
01:02 PM
|
0
|
0
|
214
|
POST
|
I am able to access styles that appear in the system styles folders, such as ArcGIS 2D. The code looks like this: var arcgis_2d = ArcGIS.Desktop.Core.Project.Current.GetItems<StyleProjectItem>().First(si => si.Name == "ArcGIS 2D"); But that code does not allow me to get to styles in the Favorites folder: How would I access styles in the Favorites folder? Thanks.
... View more
05-01-2018
05:42 PM
|
0
|
1
|
258
|
POST
|
I've been able to successfully create a scalebar in code. But I am now trying to change the line width on the scalebar. In ArcGIS Pro, that width is changed here: How would I make this change in code, assuming I've gotten this far: var cimDefinition = lsaScaleBar.GetDefinition() as CIMDoubleFillScaleBar;
var cimSymbol = cimDefinition.FillSymbol1; Thanks.
... View more
05-01-2018
03:45 PM
|
0
|
0
|
592
|
POST
|
Thanks Charles. This worked for me and I am now able to create a double fill scale bar. Can I ask one related follow up question. I would like to change the font and the number of divisions and subdivisions on this scale bar. I believe I need to use CIMDoubleFillScaleBar and CIMNumberFormat, but am not sure the proper way to go about this. Would you be able to show some additional code on the proper way to change the divisions and subdivisions to 2, and the font to a different font? Thank you.
... View more
04-24-2018
02:03 PM
|
0
|
2
|
687
|
POST
|
I am able to create a north arrow in a layout using the example in the Esri snippet (North Arrow Snippet). The primary line in that snippet is as follows: var northArrow = LayoutElementFactory.Instance.CreateNorthArrow(layout, llNorthArrow, mf); But if I want to change the style of the north arrow, how would I do that? The north arrow styles are types of fonts: Thanks.
... View more
04-23-2018
04:01 PM
|
0
|
2
|
1241
|
POST
|
I am trying to create a Double Fill Scale Bar in the ArcGIS Pro SDK.. I was able to create a default scale bar using the Esri snippets example (Pro Snippets for Layouts) which did not require specifying the type or styling for the scale bar. But now I am looking to create a scale bar with a double fill format which means I do need to somehow specify the type and style of the scale bar. I feel like I am getting close with the following code (just the relevant part of the code below), but it crashes ArcGIS Pro: Task t = QueuedTask.Run(() =>
{
Coordinate2D coord2D = new Coordinate2D(xCoord, yCoord);
CIMDoubleFillScaleBar myScaleBar = new CIMDoubleFillScaleBar
{
Division = 4
};
ScaleBarStyleItem scaleBarStyle = new ScaleBarStyleItem();
scaleBarStyle.ScaleBar = myScaleBar;
LayoutElementFactory.Instance.CreateScaleBar(activeLayout, coord2D, topMapFrame, scaleBarStyle);
}); Does anyone know what I might be missing? I'm not sure if I am using the CIMDoubleFillScaleBar and the ScaleBarStyleItem correctly. Thanks.
... View more
04-23-2018
01:57 PM
|
0
|
4
|
978
|
POST
|
I would like to resize a map frame in a layout. If the layout has more than one map frame, as in the screenshot below, how can I determine which map frame is currently the active map frame (which shows as bolded in the Contents pane)? I checked the MapFrame object and the Layout object, but did not see any properties that would tell me which map frame is active.
... View more
03-30-2018
10:24 AM
|
0
|
3
|
645
|
POST
|
Thanks for the reply Duncan, and providing some code. Unfortunately, the code is not working for Bing layers. It works for the World Imagery, but not the Bing imagery. I looked into it some more, but have still not been able to figure out the Bing interface that would give me the URL for Bing layers. If anyone else has some knowledge of what interface the Bing aerial implements, that would be appreciated.
... View more
06-20-2017
09:49 AM
|
0
|
0
|
334
|
POST
|
I am using ArcObjects in ArcMap to select a Bing aerial layer in the Table of Contents of ArcMap. I want to find out information about the service, such as the service name and URL. But I am having trouble figuring out what interface the Bing aerial service implements. Here is what I have so far: pLayer = (ILayer)mxDoc.SelectedItem; // Get the selected layer from the ArcMap TOC
IBasemapLayer bmLayer = (IBasemapLayer)pLayer;
ICompositeLayer bmCompositeLayer = (ICompositeLayer)bmLayer;
IBasemapSubLayer bmSubLayer = (IBasemapSubLayer)bmCompositeLayer.get_Layer(0);
ILayer innerLayer = bmSubLayer.Layer; But once I get to the actual inner layer of the Bing aerial service, I can't figure out what other interface this implements that might have information such as the URL or service name. So I basically have two questions: 1. What interface does the Bing aerial service implement that might provide useful information about that service, and 2. Is there an easier way of figuring out what interfaces a layer implements rather than a bunch of "If" statements asking: Is it this interface? No. Is it this? No. Is it this? No. It was a real guessing game just getting the few lines of code above. Thanks.
... View more
06-02-2017
10:27 AM
|
0
|
2
|
676
|
POST
|
I'm finding that there are some really long file names in the ArcGIS Runtime for .Net 100.0 release that are causing me some issues. They are files appearing in the resources\shaders folder. For one thing, I am getting warnings in Visual Studio about the length of these files: Second, and more significant, I am using Microsoft's ClickOnce functionality. When I tried to deploy my app using ClickOnce publishing, I was getting errors telling me the overall length of some file paths exceeded 250 characters. This prevented me from publishing. I was able to get around that problem by making my visual studio project name very short and saving the source files to a directory with a short file path. That seemed to reduce the longest file path to below the minimum, as I stopped getting the errors. But essentially it was the files in that shaders folder that were generating the errors. It would be helpful if these file names could be shortened in future releases.
... View more
05-17-2017
02:46 PM
|
0
|
1
|
833
|
POST
|
What about the case where you have a WebMap that has web services that may come from different sources (from different servers), so one web service might have 3 individual layers, and another web service from a different source may have 2 individual layers, and so on. In that situation would I need an IdentifyTask for each service?
... View more
05-04-2017
01:13 PM
|
0
|
2
|
623
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|