FromEntity[entity]
returns a Wolfram Language object corresponding to an entity.
FromEntity
FromEntity[entity]
returns a Wolfram Language object corresponding to an entity.
Details
- FromEntity evaluates for entities of type "Character", "Color", "Graph", "MathematicalConstant", "MathematicalFunction", "PhysicalConstant", "PhysicalQuantity", "Polyhedron" and "WolframLanguageSymbol".
Examples
open all close allBasic Examples (3)
Make a character from an entity:
FromEntity[Entity["Character", 9800]]FromEntity[Entity["Character", 8240]]FromEntity[Entity["Graph", "PetersenLineGraph"]]Give a quantity corresponding to a physical constant entity:
FromEntity[Entity["PhysicalConstant", "SpeedOfLight"]]InputForm[%]Scope (11)
"Character" (1)
"Color" (1)
FromEntity[Entity["Color", {"Mathematica", "Red"}]]FromEntity[Entity["Color", {"Mathematica", "Gray"}]]InputForm[%]FromEntity[Entity["Color", {"HTML", "Yellow"}]]InputForm[%]FromEntity[Entity["Color", {"Mathematica", "Gray"}]]InputForm[%]ToEntity[%]"Graph" (1)
Use a graph obtained from free-form input:
FromEntity[Entity["Graph", "DodecahedralGraph"]]Use the "Entity" property from GraphData:
FromEntity[GraphData["TesseractGraph", "Entity"]]Use a graph with a known canonical name:
FromEntity[Entity["Graph", "CubicalGraph"]]Use a member of an indexed graph family known to EntityValue:
FromEntity[Entity["Graph", {"Path", 40}]]Convert from an explicitly constructed graph entity:
FromEntity[Entity["Graph", {12, 23, 34}]]"MathematicalFunction" (2)
Convert a mathematical function entity taking a single argument:
FromEntity[Entity["MathematicalFunction", "Sin"]]Convert mathematical function entities taking multiple arguments:
FromEntity[Entity["MathematicalFunction", "HermiteH"]]FromEntity[Entity["MathematicalFunction", "HermiteH:Polynomial"]]Use FromEntity to discover how to express a given mathematical function entity in the Wolfram Language:
FromEntity[Entity["MathematicalFunction", "EllipticTheta1"]]FromEntity[Entity["MathematicalFunction", "HypergeometricPFQ:3F2"]]"PhysicalConstant" (1)
"PhysicalQuantity" (1)
"Polyhedron" (1)
"WolframLanguageSymbol" (3)
Convert a Wolfram Language symbol entity into the corresponding actual symbol:
FromEntity[Entity["WolframLanguageSymbol", "Sin"]]FromEntity[Entity["WolframLanguageSymbol", "NestList"]]Make a Wolfram Language symbol from an entity:
FromEntity[Entity["WolframLanguageSymbol", "BarChart"]]FromEntity[Entity["WolframLanguageSymbol", "CompleteGraph"]][4]The evaluated form of a symbol is returned:
FromEntity[Entity["WolframLanguageSymbol", "$Version"]]Properties & Relations (4)
The "Entity" property of GraphData can be used to return an entity on which FromEntity can operate:
GraphData["SquareGraph", "Entity"]FromEntity[%]Return the graph directly using the "Graph" property:
GraphData["SquareGraph", "Graph"]"Graph" is also the default property for GraphData:
GraphData["SquareGraph"]Any member of "AlternateStandardNames" can be used together with "Entity" in GraphData to return an entity on which FromEntity can operate:
GraphData["SquareGraph", "AlternateStandardNames"]FromEntity[GraphData[{"Ladder", 2}, "Entity"]]For colors, FromEntity typically gives the same results as returned by ColorData:
FromEntity[Entity["Color", {"HTML", "Chartreuse"}]]InputForm[%]ColorData["HTML", "Chartreuse"]InputForm[%]FromEntity can return graphs for certain indexed families even though they are not known to GraphData:
FromEntity[Entity["Graph", {"Cycle", 50}]]This graph is not known to GraphData:
GraphData[{"Cycle", 50}]But it is known to EntityValue:
EntityValue[Entity["Graph", {"Cycle", 50}], "Graph"]Possible Issues (4)
Non-entity Wolfram Language representations are not available for all entity types:
FromEntity[Entity["Movie", "ForrestGump1994ParamountPictures"]]FromEntity[Entity["City", {"LosAngeles", "California", "UnitedStates"}]]Applying ToEntity to FromEntity does not round-trip for colors:
FromEntity[Entity["Color", {"HTML", "Chartreuse"}]]InputForm[%]ToEntity[%]The result of FromEntity may evaluate if the underlying symbol autoevaluates:
FromEntity[Entity["WolframLanguageSymbol", "Red"]]InputForm[%]Compare with result of evaluating the symbol Red:
Symbol["Red"]//InputFormDifferent mathematical function entities may convert to the same Wolfram Language function:
FromEntity[Entity["MathematicalFunction", "HermiteH"]]FromEntity[Entity["MathematicalFunction", "HermiteH:Polynomial"]]See Also
ToEntity Entity EntityValue CanonicalName ColorData GraphData
Related Guides
Text
Wolfram Research (2014), FromEntity, Wolfram Language function, https://reference.wolfram.com/language/ref/FromEntity.html (updated 2022).
CMS
Wolfram Language. 2014. "FromEntity." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/FromEntity.html.
APA
Wolfram Language. (2014). FromEntity. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FromEntity.html
BibTeX
@misc{reference.wolfram_2026_fromentity, author="Wolfram Research", title="{FromEntity}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/FromEntity.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_fromentity, organization={Wolfram Research}, title={FromEntity}, year={2022}, url={https://reference.wolfram.com/language/ref/FromEntity.html}, note=[Accessed: 13-June-2026]}