Skip to content

Commit f0bab4a

Browse files
feat: allow accessing AnalysisPoint via getproperty syntax
1 parent eba5dc7 commit f0bab4a

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
@@ -1162,6 +1162,14 @@ function getvar(sys::AbstractSystem, name::Symbol; namespace = !iscomplete(sys))
11621162
end
11631163
end
11641164

1165+
if has_eqs(sys)
1166+
for eq in get_eqs(sys)
1167+
if eq.lhs isa AnalysisPoint && nameof(eq.rhs) == name
1168+
return namespace ? renamespace(sys, eq.rhs) : eq.rhs
1169+
end
1170+
end
1171+
end
1172+
11651173
throw(ArgumentError("System $(nameof(sys)): variable $name does not exist"))
11661174
end
11671175

0 commit comments

Comments
 (0)