|
POST
|
Hi Jeremiah, The reason you are only getting one page instead of all pages is because you are exporting the Layout, not the MapSeries object. Here is some code to do what you might need. p = arcpy.mp.ArcGISProject('current')
lyt = p.listLayouts('*MS')[0]
ms = lyt.mapSeries
ms.exportToPDF(r"C:\Temp\OutName.pdf", 'ALL',multiple_files='PDF_MULTIPLE_FILES_PAGE_NAME')
... View more
12-21-2022
02:03 PM
|
1
|
2
|
3488
|
|
POST
|
We have plans to add this in ArcGIS Pro 3.2. Jeff - Layout and arcpy.mp teams
... View more
12-20-2022
08:54 AM
|
0
|
0
|
3277
|
|
POST
|
@TylerT I don't think so. Think of the CIM as a way of setting properties, not methods. We have plans for 3.2 to add this capability (and other updates) to our export functions. Jeff - Layout and arcpy.mp teams
... View more
12-15-2022
05:20 PM
|
0
|
0
|
3256
|
|
IDEA
|
This is something we can consider but it will be a long time before we can provide this level of detail via the curated API. In the meantime, the CIM may be an option. Before reviewing the code below it may be worth reviewing the Python CIM Access help topic: https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm I started with: As suggested in the topic above, I created a before and after layer, saved them to LYRX files and compared the JSON differences. Here is the code based on what I see above. The before layer didn't have visual variable applied so I had to create the appropriate CIM objects, set the values to match above and then apply the newly created visual variable to the empty visual variable list associated with the layer. p = arcpy.mp.ArcGISProject('current')
m = p.listMaps('Map')[0]
l = m.listLayers('*BEFORE')[0]
maxLabel = 360 #this could be automated
#Create a rotation visual variable via the CIM
l_cim = l.getDefinition('V3')
visVar = arcpy.cim.CreateCIMObjectFromClassName('CIMRotationVisualVariable', 'V3')
#Xinfo
visVar.visualVariableInfoX.randomMax = maxLabel
visVar.visualVariableInfoX.visualVariableInfoType = "None"
#Yinfo
visVar.visualVariableInfoY.randomMax = maxLabel
visVar.visualVariableInfoY.visualVariableInfoType = "None"
#Zinfo
visVar.visualVariableInfoZ.randomMax = maxLabel
visVar.visualVariableInfoZ.visualVariableInfoType = "Expression"
#Create expression for Xinfo
expInf = arcpy.cim.CreateCIMObjectFromClassName('CIMExpressionInfo', 'V3')
expInf.title = "Custom"
expInf.expression = "$feature.Rotation" #field called rotation
expInf.returnType = "Default"
visVar.visualVariableInfoZ.valueExpressionInfo = expInf
visVar.rotationTypeZ = "Arithmetic"
l_cim.renderer.visualVariables.append(visVar) #Apply visual variable
l.setDefinition(l_cim) #set back to layer And the final result: I hope this helps, Jeff - Layout and arcpy.mp teams
... View more
12-14-2022
08:16 AM
|
0
|
0
|
3097
|
|
POST
|
Thanks for the feedback. This is something we have planned for near term. We did support it for ArcMap (arcpy.mapping) but It is currently not supported as a separate parameter for exporting. Jeff - Layout and arcpy.mp teams
... View more
11-09-2022
01:06 PM
|
0
|
0
|
3327
|
|
IDEA
|
I agree this is definitely a personal preference and would prefer to leave it alone. If we changed it we would have to be extremely careful not to affect existing projects / layouts. Jeff - Layout and arcpy.mp teams
... View more
10-20-2022
12:35 PM
|
0
|
0
|
1397
|
|
IDEA
|
@taylor I was able to reproduce your error. I've created a bug in our system and we are investigating it. Thanks you! Jeff - Layout and arcpy.mp teams
... View more
10-10-2022
10:08 AM
|
0
|
0
|
6183
|
|
IDEA
|
The Layout object in ArcGIS Pro has pageWidth, pageHeight, and pageUnits properties. This will not be supported in ArcMap. Jeff - Layout and arcpy.mp teams.
... View more
10-10-2022
08:40 AM
|
0
|
0
|
513
|
|
POST
|
@Jimmy_Simpson I did see your code and support may have given you that information because I provided it to them. It works for me. I don't know of another work around. Jeff
... View more
10-06-2022
03:10 PM
|
0
|
0
|
2698
|
|
POST
|
This issue has been addressed and we hope to include it in a 3.0 patch (targeting 3.0.4). I was able to use the following as a work around to force a refresh. Layout lyt = LayoutView.Active.Layout; await QueuedTask.Run(() => { Element elm = lyt.FindElement("Picture"); var pic = elm as PictureElement; var pic_URL = pic.SourcePath; string imagePathNew = @"C:\Active\Layout\SDK\BUGS\BUG-000151182\sample.png"; pic.SetSourcePath(imagePathNew); //Force layout refresh var lyt_cim = lyt.GetDefinition(); lyt.SetDefinition(lyt_cim); }); Jeff - Layout and arcpy.mp teams.
... View more
10-06-2022
10:01 AM
|
0
|
2
|
2704
|
|
IDEA
|
@taylor can you please provide more information. Can I see more of the script? Are you running it from a script tool, the Python Window? I can NOT reproduce your scenario, I'll need more information. Jeff - Layout and arcpy.mp teams
... View more
10-05-2022
04:06 PM
|
0
|
0
|
6227
|
|
IDEA
|
Bahram-Jomehzadeh WOW, how did you get that release? We are currently developing 3.1, 3.0 should be the current release. We won't change the status of this idea to "implemented" until 3.1 is released. Jeff - layout and arcpy.mp teams.
... View more
09-30-2022
04:53 PM
|
0
|
0
|
2927
|
|
IDEA
|
This won't be addressed for arcpy.mapping (ArcMap) but we do plan to add it to arcpy.mp (Pro). Time for stand-alone tables was just made available at 3.0. We hope to make it available in the near term. Adding members similar to Layer like isTimeEnabled and enableTime() makes good sense. Jeff - arcpy.mp and Layout teams.
... View more
09-30-2022
03:21 PM
|
0
|
0
|
1760
|
|
IDEA
|
I realize this is an old request. Can you please clarify the workflow and provide example of what you are trying to do? We won't make new arcpy.mapping changes to ArcMap but if this is still a requirement for ArcGIS Pro, please provide more detail. Jeff - arcpy.mp and Layout teams
... View more
09-30-2022
02:34 PM
|
0
|
0
|
814
|
|
IDEA
|
This is something we implemented for ArcGIS Pro 3.1. Jeff - Layout and arcpy.mp teams
... View more
09-30-2022
02:32 PM
|
0
|
0
|
1822
|
| 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
|