|
IDEA
|
We are targeting this capability for Pro 2.7. Note - even though the CIM properties currently exist, changing the CIM definition for a layer's selection symbol will also not work. Jeff - arcpy.mp Team
... View more
03-23-2020
02:54 PM
|
1
|
0
|
5337
|
|
POST
|
Hello Thomas. Would it be possible for you to send me a project package (ppkx) of your project? If possible, send to [email protected] Jeff
... View more
03-10-2020
07:45 AM
|
0
|
0
|
5113
|
|
POST
|
I have reproduced the issue in 2.5. For me I see a difference when Color Management is enabled or disabled in the Application (so changing the state in one project will affect another project). To confirm, goto Project--> Options--> Color Management. For me, when Color Management is disabled, I see the 'washed out' effect. When enabled, setting HasColorProfile = true/false has no difference in the visible output. When CM is disabled, HasColorProfile is ignored. Is it possible this setting has changed within the project? Thanks Jeff - Layout Team
... View more
03-09-2020
12:13 PM
|
1
|
12
|
7965
|
|
POST
|
Hello Brennan, This was a great question and certainly generated some good discussion within our team. May I ask why you want the "actual bounds of the element within the page"? My assumption is that you want to position the element relative to other elements or other coordinates on the page. If we were to build a helper function that required less gymnastics that the code above, what is it exactly you need? Is it simply a polygon/extent? Maybe a r/o .getPageEnvelope(). Or is it a list of x/y min/max values you need to perform the appropriate shifts on the page. Below is an alternative script that does something very similar to the code above. I don't need to create a geometry if I have the stats below to perform my positional adjustments. But equally difficult is shifting an element on the layout based on the anchor position. Granted the math is easier but there are 8 positions to take into account. Again, if you could help recommend the exact function that would help with your workflow we might be able to add that capability into a future API. Jeff - Layout Team Layout layout = LayoutView.Active.Layout;
await QueuedTask.Run(() =>
{
//Reference text element and preserve original settings
TextElement txtElm = layout.FindElement("Text") as TextElement;
Double xMin = txtElm.GetX(), xMax = txtElm.GetX();
Double yMin = txtElm.GetY(), yMax = txtElm.GetY();
Anchor orig_anchor = txtElm.GetAnchor();
//Iterate through each anchor position and preserve min/max values
var values = Enum.GetValues(typeof(Anchor));
foreach (Anchor val in values)
{
txtElm.SetAnchor(val);
if (txtElm.GetX() < xMin) { xMin = txtElm.GetX(); }
if (txtElm.GetY() < yMin) { yMin = txtElm.GetY(); }
if (txtElm.GetX() > xMax) { xMax = txtElm.GetX(); }
if (txtElm.GetY() > yMax) { yMax = txtElm.GetY(); }
}
txtElm.SetAnchor(orig_anchor); //Need to set back to original location
//The following just creates a visual representation of the graphic
Envelope env = EnvelopeBuilder.CreateEnvelope(xMin, yMin, xMax, yMax, null);
CIMStroke lineStroke = SymbolFactory.Instance.ConstructStroke(ColorFactory.Instance.BlackRGB, 1, SimpleLineStyle.DashDotDot);
LayoutElementFactory.Instance.CreatePolygonGraphicElement(layout, env, SymbolFactory.Instance.ConstructPolygonSymbol(ColorFactory.Instance.RedRGB, SimpleFillStyle.Null, lineStroke));
});
... View more
02-27-2020
08:52 AM
|
0
|
1
|
4087
|
|
POST
|
Thank you for your post Brennan. I can not think of a work around currently, I even evaluated CIM definitions for a possible property. You make two very good points: 1) we should at least expose a flag for paragraph text and other layout elements that show the red ellipses indicating something doesn't fit and 2) even the UI (and SDK) could benefit from having a fitting strategy on paragraph text similar to legends. I will submit these ideas to the rest of the Layout team for consideration. Concerning number 1, I hope this is something we should be able to expose. I assume right now it is simply an internal property. Jeff - Layout Team
... View more
02-26-2020
02:41 PM
|
1
|
1
|
2089
|
|
POST
|
Adam, Thank you for reporting this. I can see this with 2.4 and 2.5. We will investigate and hopefully address it for 2.6. Jeff - Layout team
... View more
02-12-2020
08:56 AM
|
0
|
1
|
1818
|
|
POST
|
Adam, Thank you for reporting this. I can also reproduce the crash when I create the command in 2.4 and use in 2.5. Again, its a regression and we will address it immediately in 2.6 and hopefully address in a 2.5 patch. In this case, I get slightly different results if I use .SetName(). The elements don't disappear, they get added to the root level. Similar to another scenario you reported. Jeff - Layout team
... View more
02-12-2020
08:52 AM
|
0
|
0
|
951
|
|
POST
|
Adam, Thank you for reporting this. I can also reproduce the crash when I create the command in 2.4 and use in 2.5. Again, its a regression and we will address it immediately in 2.6 and hopefully address in a 2.5 patch. Jeff - Layout team
... View more
02-12-2020
08:49 AM
|
0
|
0
|
1063
|
|
POST
|
Adam, I really appreciate you reporting this! I've reproduced the bad behavior on Pro 2.4 and noticed that if the same command is used in Pro 2.5, a crash will occur. This is a regression and will be fixed immediately in 2.6 and hopefully added to a 2.5 patch. I noticed the issue still occurs if I use SetName() vs changing the element name via the CIM. Jeff - Layout Team
... View more
02-12-2020
08:46 AM
|
0
|
1
|
999
|
|
POST
|
Hello David, you ask a great question and I have a couple of comments. First, the ArcGIS Pro software development is currently working on supporting map graphics. The plans are for 2.6. This might eliminate your need to attempt to build this map unit to page unit transformation. But ... Second, I did make an attempt to try what you needed. It is not easy because a map frame has a camera and the camera has an XY center point (and scale). Extent is not persisted with the camera because the camera works for 3D as well where extents really don't make sense. So extents are derived from center point and scale. That along with your map frame width and height in page units you can do a proportional transformation. Here is code where I have a hard coded targetX and targetY in map units and place those proportionally on a map frame using the appropriate math. What I learned from this is that we should at least have a helper function that returns the derived extent. This would eliminate the extra work of determining x/y min/max values. ////Convert map units to page units
Layout layout = LayoutView.Active.Layout;
await QueuedTask.Run(() =>
{
//Reference MapFrame
MapFrame mf = layout.FindElement("Map Frame") as MapFrame;
double camScale = mf.Camera.Scale;
//Build X in page unts at 995200 map units
double targetX = 995200;
double camX = mf.Camera.X; //Map feet
double mfWidth = mf.GetWidth(); //Page inches
double xMin = camX - (mfWidth / 2) * (camScale / 12);
double xMax = camX + (mfWidth / 2) * (camScale / 12);
double xPer = (targetX - xMin) / (xMax - xMin);
double xSpot = (mfWidth * xPer) + mf.GetX();
//Build Y in page unts at 604719 map units
double targetY = 604700;
double camY = mf.Camera.Y; //Map feet
double mfHeight = mf.GetHeight(); // Page inches
double yMin = camY - (mfHeight / 2) * (camScale / 12);
double yMax = camY + (mfHeight / 2) * (camScale / 12);
double yPer = (targetY - yMin) / (yMax - yMin);
double ySpot = (mfHeight * yPer) + mf.GetY();
//Build geometry
Coordinate2D coord2D = new Coordinate2D(xSpot, ySpot);
//Set symbolology, create and add element to layout
CIMPointSymbol pointSym = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.RedRGB, 25.0, SimpleMarkerStyle.Star);
GraphicElement ptElm = LayoutElementFactory.Instance.CreatePointGraphicElement(layout, coord2D, pointSym);
ptElm.SetName("New MapGraphic Point");
});
... View more
02-05-2020
08:39 AM
|
0
|
0
|
2102
|
|
IDEA
|
Hi Michael, At 2.6 we will be introducing a Bookmark Map Series option. This will allow you to set the extents for each 'page' in the map series to a bookmark extent. Thematic map books are something we are strongly considering for a future release but for now arcpy.mp is really the only way to control the precise logic needed to generate each unique page in the series. Jeff Esri Layout and arcpy.mp teams.
... View more
01-06-2020
02:50 PM
|
2
|
0
|
6376
|
|
POST
|
Hello Ana, Thank you for reporting this. We just addressed this very recently (post 2.5 final). Unfortunately, refresh isn't happening in the UI but you are seeing the correctly results in the export. What I noticed is that if I manually interact with turning labels on/off and then run my scripts they work as expected. I know this doesn't help with your automation but if you try toggling visibility manually by toggling on/off and then run your scripts, do you see the refresh? Thanks, Jeff arcpy.mp team
... View more
12-30-2019
02:44 PM
|
1
|
1
|
1356
|
|
POST
|
Thank you for bringing this requirement to our attention. The SourceModifiedTime property is only used for project items that were added from a portal. The documentation will be updated to reflect its purpose more clearly. The development team will strongly consider this requirement and possibly add a new property specific to this use case (e.g., LastModified). The final solution goes beyond just Layout project items. We do not have a time frame since there are details to be worked out. In the meantime, Wolfgang's suggestion is hopefully a viable solution. Jeff Layout Team
... View more
12-11-2019
08:55 AM
|
0
|
0
|
1228
|
|
POST
|
I want to clarify terms: "Create " or "Author" a map series vs "Enable" a map series. The arcpy.mp API allows you to enable or disable an already existing map series. If a layout does NOT already have an existing map series, you can NOT create one. You must use the UI to author the map series. Since the beginning the arcpy.mapping/mp API was mostly designed to automate existing objects to avoid the complexities of providing an API that can author everything from scratch. We do have plans to provide creation capabilities in the future but need to focus on arcpy.mapping equivalency first. Jeff - arcpy.mp team
... View more
11-12-2019
10:43 AM
|
2
|
1
|
8778
|
|
POST
|
"Main DF" is a wildcard search for the name of the data frame. You may be searching for a data frame with a different name.
... View more
10-16-2019
10:34 AM
|
2
|
1
|
3791
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-05-2025 11:20 AM | |
| 3 | 06-05-2025 09:21 AM | |
| 1 | 05-14-2025 01:19 PM | |
| 2 | 04-24-2025 07:54 AM | |
| 1 | 03-15-2025 07:19 PM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|