PropertyList

As of Version 12.1, PropertyList has been superseded by AnnotationKeys.

PropertyList[{obj,itemspec}]

lists the properties available for itemspec in obj.

Details

  • Properties are used to store and manipulate name->value pairs for specific named items within an object such as Graph, MeshRegion, and BoundaryMeshRegion.
  • The item specification itemspec typically has the form {collection,index}.
  • The index can typically have the following forms:
  • inda single index
    {ind1,ind2,}a list of indexes
    Allall possible indexes in collection
    pattindexes that match patt in collection
  • The collection can typically have the following forms:
  • cola single collection
    {col1,col2,}a list of collections
    Allall possible collections
    pattcollections that match patt
  • The item specification itemspec of the form collection refers to the default value for all indexes in the collection.
  • For an item specification itemspec that refers to more than a single item, PropertyList will give the union of properties for the different items.
  • Objects that support properties include Graph, MeshRegion, and BoundaryMeshRegion. Item specifications for each type of object is given in their reference pages.

Examples

open allclose all

Basic Examples  (2)

Get a list of standard properties for a vertex:

For an edge:

Test for the presence of custom properties:

Scope  (1)

PropertyList applies to vertices:

And edges:

Properties & Relations  (6)

Use Property as a wrapper to specify properties in functions such as Graph:

Use PropertyValue to extract values:

For undefined properties, the value $Failed is returned:

Use PropertyValue to set properties in a graph:

The original graph has changed:

Use PropertyValue to unset properties in a graph:

The original graph has changed:

Use SetProperty to set the properties in a new graph:

The original graph is unchanged:

Use RemoveProperty to remove a property without changing the original:

The original graph is unchanged:

Wolfram Research (2010), PropertyList, Wolfram Language function, https://reference.wolfram.com/language/ref/PropertyList.html (updated 2015).

Text

Wolfram Research (2010), PropertyList, Wolfram Language function, https://reference.wolfram.com/language/ref/PropertyList.html (updated 2015).

CMS

Wolfram Language. 2010. "PropertyList." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/PropertyList.html.

APA

Wolfram Language. (2010). PropertyList. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PropertyList.html

BibTeX

@misc{reference.wolfram_2024_propertylist, author="Wolfram Research", title="{PropertyList}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/PropertyList.html}", note=[Accessed: 30-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_propertylist, organization={Wolfram Research}, title={PropertyList}, year={2015}, url={https://reference.wolfram.com/language/ref/PropertyList.html}, note=[Accessed: 30-December-2024 ]}