project
Classes:
| Name | Description |
|---|---|
Bookmark |
|
BookmarkManager |
|
BookmarkMapSeries |
Wrapper around an arcpy.mp BookmarkMapSeries object that provides an ergonomic interface |
ElevationSurface |
|
ElevationSurfaceManager |
|
Layer |
mp.Layer wrapper |
LayerManager |
|
Layout |
|
LayoutManager |
|
Manager |
Base access interfaces for all manager classes. Specific interfaces are defined in the subclass |
Map |
|
MapManager |
|
MapSeries |
Wrapper around an arcpy.mp MapSeries object that provides an ergonomic interface |
MappingWrapper |
Internal wrapper class for wrapping existing objects with new functionality |
Project |
Wrapper for an ArcGISProject (.aprx) |
Report |
|
ReportManager |
|
Table |
|
TableManager |
|
Wildcard |
Clarify that the string passed to a Manager index is a wildcard so the type checker knows you're getting a Sequence back |
Functions:
| Name | Description |
|---|---|
name_of |
Handle the naming hierarchy of mapping objects URI -> longName -> name |
Bookmark
¶
Bases: MappingWrapper[Bookmark, CIMBookmark], Bookmark
Source code in src/arcpie/project.py
227 | |
BookmarkManager
¶
BookmarkMapSeries
¶
Bases: MappingWrapper[BookmarkMapSeries, CIMBookmarkMapSeries], BookmarkMapSeries
Wrapper around an arcpy.mp BookmarkMapSeries object that provides an ergonomic interface
Methods:
| Name | Description |
|---|---|
__getitem__ |
Allow indexing the BookmarkMapSeries by name, index, or Bookmark object |
__iter__ |
|
__len__ |
|
Source code in src/arcpie/project.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | |
__getitem__(page)
¶
Allow indexing the BookmarkMapSeries by name, index, or Bookmark object
Source code in src/arcpie/project.py
240 241 242 243 244 245 246 247 248 249 | |
__iter__()
¶
Source code in src/arcpie/project.py
232 233 234 235 236 237 238 | |
__len__()
¶
Source code in src/arcpie/project.py
251 252 | |
ElevationSurface
¶
Bases: MappingWrapper[ElevationSurface, CIMElevationSurfaceLayer], ElevationSurface
Source code in src/arcpie/project.py
353 | |
ElevationSurfaceManager
¶
Bases: Manager[ElevationSurface]
Source code in src/arcpie/project.py
699 | |
Layer
¶
Bases: MappingWrapper[Layer, CIMBaseLayer], Layer
mp.Layer wrapper
Methods:
| Name | Description |
|---|---|
export_lyrx |
Export the layer to a lyrx file in the target directory |
import_lyrx |
Import the layer state from an lyrx file |
Attributes:
| Name | Type | Description |
|---|---|---|
cim |
CIMBaseLayer
|
|
feature_class |
FeatureClass
|
Get a |
lyrx |
dict[str, Any] | None
|
Get a dictionary representation of the layer that can be saved to an lyrx file using |
symbology |
Symbology
|
Get the base symbology object for the layer |
Source code in src/arcpie/project.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
cim
property
¶
feature_class
property
¶
Get a arcpie.FeatureClass object that is initialized using the layer and its current state
lyrx
property
¶
Get a dictionary representation of the layer that can be saved to an lyrx file using json.dumps
Note
GroupLayer objects will return a lyrx template with all sub-layers included
symbology
property
¶
Get the base symbology object for the layer
export_lyrx(out_dir)
¶
Export the layer to a lyrx file in the target directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
out_dir
|
Path | str
|
The location to export the mapx to |
required |
Source code in src/arcpie/project.py
189 190 191 192 193 194 195 196 197 198 199 | |
import_lyrx(lyrx)
¶
Import the layer state from an lyrx file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lyrx
|
Path | str
|
The lyrx file to update this layer with |
required |
Note
CIM changes require the APRX to be saved to take effect. If you are accessing this
layer via a Project, use project.save() after importing the layerfile
Source code in src/arcpie/project.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
LayerManager
¶
Layout
¶
Bases: MappingWrapper[Layout, CIMLayout], Layout
Methods:
| Name | Description |
|---|---|
to_pdf |
Get the bytes for a pdf export of the Layout |
Attributes:
| Name | Type | Description |
|---|---|---|
mapseries |
MapSeries | BookmarkMapSeries | None
|
Get the Layout MapSeries/BookmarkMapSeries if it exists |
pagx |
dict[str, Any]
|
Access the raw CIM dictionary of the layout |
Source code in src/arcpie/project.py
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | |
mapseries
property
¶
Get the Layout MapSeries/BookmarkMapSeries if it exists
pagx
property
¶
Access the raw CIM dictionary of the layout
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
A dictionary representation of the pagx json |
to_pdf(**settings)
¶
Get the bytes for a pdf export of the Layout
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**settings
|
PDFSetting
|
Optional settings for the export (default: |
{}
|
Returns:
| Type | Description |
|---|---|
bytes
|
Raw bytes of the PDF for use in a write operation or stream |
Example
# Get the layout object from a project file
lyt = prj.layouts['Layout_1']
# Create a pdf then write the output of to_pdf to it
pdf = Path('pdf_path').write_bytes(lyt.to_pdf())
Source code in src/arcpie/project.py
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | |
LayoutManager
¶
Manager
¶
Bases: Generic[_MappingObject]
Base access interfaces for all manager classes. Specific interfaces are defined in the subclass
Index itentifiers are URI -> longName -> name depending on what is available in the managed class
Methods:
| Name | Description |
|---|---|
__contains__ |
Check to see if a URI/name is present in the Manager |
__getitem__ |
Access objects using a regex pattern (re.compile), wildcard (STRING), index, slice, name, or URI |
__init__ |
|
__iter__ |
|
__len__ |
|
get |
Get a value from the Project with a safe default value |
Attributes:
| Name | Type | Description |
|---|---|---|
names |
list[str]
|
Get the names of all managed objects (skips URIs) |
objects |
list[_MappingObject]
|
Get a list of all managed objects |
uris |
list[str]
|
Get URIs/CIMPATH for all managed objects |
Source code in src/arcpie/project.py
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | |
names
property
¶
Get the names of all managed objects (skips URIs)
objects
property
¶
Get a list of all managed objects
uris
property
¶
Get URIs/CIMPATH for all managed objects
Note
Default to a Python id() call if no URI is present
__contains__(name)
¶
Check to see if a URI/name is present in the Manager
Source code in src/arcpie/project.py
678 679 680 681 682 683 684 | |
__getitem__(name)
¶
__getitem__(name: str) -> _MappingObject
__getitem__(name: int) -> _MappingObject
__getitem__(name: Wildcard) -> list[_MappingObject]
__getitem__(name: re.Pattern[str]) -> list[_MappingObject]
__getitem__(name: slice) -> list[_MappingObject]
Access objects using a regex pattern (re.compile), wildcard (STRING), index, slice, name, or URI
Source code in src/arcpie/project.py
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | |
__init__(objs)
¶
Source code in src/arcpie/project.py
605 606 607 608 609 | |
__iter__()
¶
Source code in src/arcpie/project.py
686 687 | |
__len__()
¶
Source code in src/arcpie/project.py
689 690 | |
get(name, default=None)
¶
get(name: str) -> _MappingObject
get(name: Wildcard) -> list[_MappingObject]
get(
name: str, default: _Default
) -> _MappingObject | _Default
get(
name: Wildcard, default: _Default
) -> list[_MappingObject] | _Default
Get a value from the Project with a safe default value
Source code in src/arcpie/project.py
671 672 673 674 675 676 | |
Map
¶
Bases: MappingWrapper[Map, CIMMapDocument], Map
Methods:
| Name | Description |
|---|---|
__getitem__ |
|
export_assoc_lyrx |
Export all child layers to lyrx files the target directory |
export_mapx |
Export the map definitions to a mapx file in the target directory |
get |
|
import_assoc_lyrx |
Imports lyrx files that were exported using the |
import_mapx |
|
Attributes:
| Name | Type | Description |
|---|---|---|
bookmarks |
BookmarkManager
|
Get a BookmarkManager for all bookmarks in the Map |
cim |
CIMMapDocument
|
|
cim_dict |
dict[str, Any]
|
|
elevation_surfaces |
ElevationSurfaceManager
|
Get an ElevationSurfaceManager for all elevation surfaces in the Map |
layers |
LayerManager
|
Get a LayerManager for all layers in the Map |
mapx |
dict[str, Any]
|
|
tables |
TableManager
|
Get a TableManager for all tables in the Map |
Source code in src/arcpie/project.py
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 | |
bookmarks
cached
property
¶
Get a BookmarkManager for all bookmarks in the Map
cim
property
¶
cim_dict
property
¶
elevation_surfaces
cached
property
¶
Get an ElevationSurfaceManager for all elevation surfaces in the Map
layers
cached
property
¶
Get a LayerManager for all layers in the Map
mapx
property
¶
tables
cached
property
¶
Get a TableManager for all tables in the Map
__getitem__(name)
¶
__getitem__(name: str) -> Layer | Table
__getitem__(name: Wildcard) -> list[Layer] | list[Table]
Source code in src/arcpie/project.py
394 395 396 397 398 | |
export_assoc_lyrx(out_dir, *, skip_groups=False, skip_grouped=False)
¶
Export all child layers to lyrx files the target directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
out_dir
|
Path | str
|
The location to export the lyrx files to |
required |
skip_groups
|
bool
|
Skip group layerfiles and export each layer individually in a group subdirectory (default: False) |
False
|
skip_grouped
|
bool
|
Inverse of skip groups and instead only exports the group lyrx, skipping the individual layers (default: False) |
False
|
Source code in src/arcpie/project.py
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | |
export_mapx(out_dir)
¶
Export the map definitions to a mapx file in the target directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
out_dir
|
Path | str
|
The location to export the mapx to |
required |
Source code in src/arcpie/project.py
410 411 412 413 414 415 416 417 | |
get(name, default=None)
¶
get(
name: str, default: _Default
) -> Layer | Table | _Default
get(
name: Wildcard, default: _Default
) -> list[Layer] | list[Table] | _Default
Source code in src/arcpie/project.py
404 405 406 407 408 | |
import_assoc_lyrx(lyrx_dir, *, skip_groups=False)
¶
Imports lyrx files that were exported using the export_assoc_lyrx method
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lyrx_dir
|
Path | str
|
The directory containing the previously exported lyrx files |
required |
Note
CIM changes require the APRX to be saved to take effect. If you are accessing this
layer via a Project, use project.save() after importing the layerfile
Source code in src/arcpie/project.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | |
import_mapx(mapx)
¶
Source code in src/arcpie/project.py
462 463 | |
MapManager
¶
MapSeries
¶
Bases: MappingWrapper[MapSeries, CIMMapSeries], MapSeries
Wrapper around an arcpy.mp MapSeries object that provides an ergonomic interface
Methods:
| Name | Description |
|---|---|
__getitem__ |
Allow indexing a mapseries by a page name or a page index/number |
__iter__ |
|
__len__ |
|
__repr__ |
|
to_pdf |
Export the MapSeries to a PDF, See Layer.to_pdf for more info |
Attributes:
| Name | Type | Description |
|---|---|---|
current_page_name |
str
|
Get the name of the active mapseries page |
feature_class |
FeatureClass
|
Get the FeatureClass of the parent layer |
layer |
Layer
|
Get the mapseries target layer |
map |
Map
|
Get the map object that is being seriesed |
pageRow |
Get a Row object for the active mapseries page |
|
page_field |
str
|
Get fieldname used as pagename |
page_field_names |
list[str]
|
Get all fieldnames for the mapseriesed features |
page_values |
dict[str, Any]
|
Get a mapping of values for the current page |
valid_pages |
list[str]
|
Get all valid page names for the MapSeries |
Source code in src/arcpie/project.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
current_page_name
property
¶
Get the name of the active mapseries page
feature_class
property
¶
Get the FeatureClass of the parent layer
layer
property
¶
Get the mapseries target layer
map
property
¶
Get the map object that is being seriesed
pageRow
property
¶
Get a Row object for the active mapseries page
page_field
property
¶
Get fieldname used as pagename
page_field_names
cached
property
¶
Get all fieldnames for the mapseriesed features
page_values
property
¶
Get a mapping of values for the current page
valid_pages
property
¶
Get all valid page names for the MapSeries
__getitem__(page)
¶
Allow indexing a mapseries by a page name or a page index/number
Source code in src/arcpie/project.py
334 335 336 337 338 339 340 341 342 343 344 345 | |
__iter__()
¶
Source code in src/arcpie/project.py
326 327 328 329 330 331 332 | |
__len__()
¶
Source code in src/arcpie/project.py
347 348 | |
__repr__()
¶
Source code in src/arcpie/project.py
350 351 | |
to_pdf(**settings)
¶
Export the MapSeries to a PDF, See Layer.to_pdf for more info
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**settings
|
Unpack[MapSeriesPDFSetting]
|
Passthrough kwargs for layout.exportToPDF |
{}
|
Note
By default, printing a mapseries will print all pages to a single file. To only print the active page:
>>> ms.to_pdf(page_range_type='CURRENT')
Source code in src/arcpie/project.py
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | |
MappingWrapper
¶
Bases: Generic[_MapType, _CIMType]
Internal wrapper class for wrapping existing objects with new functionality
Usage
>>> MappingWraper[mp.<type>, cim.<type>](mp.<type>)
Note
All
Methods:
| Name | Description |
|---|---|
__eq__ |
|
__getattr__ |
|
__init__ |
|
__repr__ |
|
Attributes:
| Name | Type | Description |
|---|---|---|
cim |
_CIMType
|
|
cim_dict |
dict[str, Any] | None
|
|
parent |
The parent object for the wrapper |
|
unique_name |
str
|
Get the longName or name of the object. Use id for any object without a name attribute |
uri |
str
|
Get the URI for the object or the id with |
Source code in src/arcpie/project.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
cim
property
¶
cim_dict
property
¶
parent
property
¶
The parent object for the wrapper
Project -> Map -> Layer
Project -> Layout -> Map -> MapSeries
Project -> Report
The general parent/child relationships are based on how you would access the object in ArcPro. Projects have maps, maps have layers, layouts have mapseries etc.
unique_name
property
¶
Get the longName or name of the object. Use id for any object without a name attribute
uri
property
¶
Get the URI for the object or the id with :NO_URI at the end
__eq__(other)
¶
Source code in src/arcpie/project.py
137 138 139 140 141 | |
__getattr__(attr)
¶
Source code in src/arcpie/project.py
131 132 | |
__init__(obj, parent=None)
¶
Source code in src/arcpie/project.py
88 89 90 | |
__repr__()
¶
Source code in src/arcpie/project.py
134 135 | |
Project
¶
Wrapper for an ArcGISProject (.aprx)
Usage
>>> prj = Project('<path/to/aprx>')
>>> lay = prj.layouts.get('My Layout')
>>> Path('My Layout.pdf').write_bytes(prj.layouts.get('My Layout').to_pdf())
4593490 # Bytes written
>>> for map in prj.maps:
... print(f'{map.name} has {len(map.layers)} layers')
My Map has 5 layers
My Map 2 has 15 layers
Other Map has 56 layers
Methods:
| Name | Description |
|---|---|
__getitem__ |
Resolve the name by looking in Maps, then Layouts, then Reports |
__init__ |
|
__repr__ |
|
export_layers |
Export all layers in the project to a structured directory of layerfiles |
export_mapx |
Export all maps to a directory |
export_pagx |
Export all layouts to a directory |
get |
|
import_layers |
Import a structured directory of layerfiles generated with |
import_mapx |
Import a mapx file into this project |
import_pagx |
Import a pagx file into this project |
refresh |
Clear cached object managers |
save |
Save this project |
save_as |
Saves the project under a new name |
Attributes:
| Name | Type | Description |
|---|---|---|
aprx |
ArcGISProject
|
Get the base ArcGISProject for the Project |
broken_layers |
LayerManager
|
Get a LayerManager for all layers in the project with broken datasources |
broken_tables |
TableManager
|
Get a TableManager for all tables in the project with broken datasources |
layouts |
LayoutManager
|
Get a LayoutManager for the Project layouts |
maps |
MapManager
|
Get a MapManager for the Project maps |
name |
str
|
Get the file name of the wrapped aprx minus the file extension |
reports |
ReportManager
|
Get a ReportManager for the Project reports |
tree |
dict[str, Any]
|
|
Source code in src/arcpie/project.py
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 | |
aprx
property
¶
Get the base ArcGISProject for the Project
broken_layers
property
¶
Get a LayerManager for all layers in the project with broken datasources
broken_tables
property
¶
Get a TableManager for all tables in the project with broken datasources
layouts
cached
property
¶
Get a LayoutManager for the Project layouts
maps
cached
property
¶
Get a MapManager for the Project maps
name
property
¶
Get the file name of the wrapped aprx minus the file extension
reports
cached
property
¶
Get a ReportManager for the Project reports
tree
property
¶
__getitem__(name)
¶
__getitem__(name: str) -> Map | Layout | Report
__getitem__(
name: Wildcard,
) -> list[Map] | list[Layout] | list[Report]
Resolve the name by looking in Maps, then Layouts, then Reports
Source code in src/arcpie/project.py
784 785 786 787 788 789 | |
__init__(aprx_path='CURRENT')
¶
Source code in src/arcpie/project.py
717 718 | |
__repr__()
¶
Source code in src/arcpie/project.py
720 721 | |
export_layers(target_dir, *, skip_groups=False, skip_grouped=False)
¶
Export all layers in the project to a structured directory of layerfiles
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_dir
|
Path | str
|
The target directory to export the layerfiles to |
required |
skip_groups
|
bool
|
Skip group layerfiles and export each layer individually in a group subdirectory (default: False) |
False
|
skip_grouped
|
bool
|
Inverse of skip groups and instead only exports the group lyrx, skipping the individual layers (default: False) |
False
|
Source code in src/arcpie/project.py
880 881 882 883 884 885 886 887 888 889 890 | |
export_mapx(target_dir)
¶
Export all maps to a directory
Source code in src/arcpie/project.py
873 874 875 876 877 878 | |
export_pagx(target_dir)
¶
Export all layouts to a directory
Source code in src/arcpie/project.py
844 845 846 847 848 849 | |
get(name, default=None)
¶
get(
name: str, default: _Default
) -> Map | Layout | Report | _Default
get(
name: Wildcard, default: _Default
) -> list[Map] | list[Layout] | list[Report] | _Default
Source code in src/arcpie/project.py
795 796 797 798 799 | |
import_layers(src_dir)
¶
Import a structured directory of layerfiles generated with export_layers
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
src_dir
|
Path | str
|
A directory containing layer files in map directories and group directories |
required |
Note
CIM changes require the APRX to be saved to take effect. If you are accessing this
layer via a Project, use project.save() after importing the layerfile
Source code in src/arcpie/project.py
892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 | |
import_mapx(mapx)
¶
Import a mapx file into this project
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mapx
|
Path | str
|
The path to the mapx document |
required |
Returns:
| Type | Description |
|---|---|
Map
|
A Map parented to this project |
Source code in src/arcpie/project.py
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 | |
import_pagx(pagx, *, reuse_existing_maps=True)
¶
Import a pagx file into this project
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pagx
|
Path | str
|
The path to the pagx document |
required |
Returns:
| Type | Description |
|---|---|
Layout
|
A Layout parented to this project |
Source code in src/arcpie/project.py
822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 | |
refresh(*managers)
¶
Clear cached object managers
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
*managers
|
*str
|
Optionally limit cache clearing to certain managers (attribute name) |
()
|
Source code in src/arcpie/project.py
912 913 914 915 916 917 918 919 920 921 | |
save()
¶
Save this project
Source code in src/arcpie/project.py
801 802 803 | |
save_as(path)
¶
Saves the project under a new name
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | str
|
The filepath of the new aprx |
required |
Returns:
| Type | Description |
|---|---|
Project
|
A Project representing the new project file |
Note
Saving a Project as a new project will not update this instance, and instead returns a new Project instance targeted at the new file
Source code in src/arcpie/project.py
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 | |
Report
¶
Bases: MappingWrapper[Report, CIMReport], Report
Source code in src/arcpie/project.py
566 | |
ReportManager
¶
Table
¶
Bases: MappingWrapper[Table, CIMStandaloneTable], Table
Methods:
| Name | Description |
|---|---|
export_lyrx |
Export the layer to a lyrx file in the target directory |
import_lyrx |
Import the table state from an lyrx file |
Attributes:
| Name | Type | Description |
|---|---|---|
cim |
CIMStandaloneTable
|
|
lyrx |
dict[str, Any]
|
|
table |
Table
|
Get an |
Source code in src/arcpie/project.py
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 | |
cim
property
¶
lyrx
property
¶
table
property
¶
Get an arcpie.Table object from the TableLayer
export_lyrx(out_dir)
¶
Export the layer to a lyrx file in the target directory
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
out_dir
|
Path | str
|
The location to export the lyrx to |
required |
Source code in src/arcpie/project.py
533 534 535 536 537 538 539 540 541 542 | |
import_lyrx(lyrx)
¶
Import the table state from an lyrx file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lyrx
|
Path | str
|
The lyrx file to update this table with |
required |
Note
CIM changes require the APRX to be saved to take effect. If you are accessing this
layer via a Project, use project.save() after importing the layerfile
Source code in src/arcpie/project.py
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 | |
TableManager
¶
Wildcard
¶
Bases: UserString
Clarify that the string passed to a Manager index is a wildcard so the type checker knows you're getting a Sequence back
Source code in src/arcpie/project.py
73 74 75 | |
name_of(o, skip_uri=False, uri_only=False)
¶
Handle the naming hierarchy of mapping objects URI -> longName -> name
Allow setting flags to get specific names
Note
If a URI is requested and no URI attribute is available in object,
'obj.name: NO URI(id(obj))' will be returned, e.g. 'my_bookmark: NO URI(1239012093)'
Source code in src/arcpie/project.py
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | |