Skip to content

Commit ccfe18e

Browse files
docs: document getproperty(::AbstractSystem, ::Symbol)
1 parent a033042 commit ccfe18e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/systems/abstractsystem.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,14 @@ function Base.propertynames(sys::AbstractSystem; private = false)
10101010
end
10111011
end
10121012

1013+
"""
1014+
Base.getproperty(sys::AbstractSystem, name::Symbol)
1015+
1016+
Access the subsystem, variable or analysis point of `sys` named `name`. To check if `sys`
1017+
will namespace the returned value, use `ModelingToolkit.does_namespacing(sys)`.
1018+
1019+
See also: [`ModelingToolkit.does_namespacing`](@ref).
1020+
"""
10131021
function Base.getproperty(
10141022
sys::AbstractSystem, name::Symbol; namespace = does_namespacing(sys))
10151023
if has_parent(sys) && (parent = get_parent(sys); parent !== nothing)

0 commit comments

Comments
 (0)