Macro Help #10558
Unanswered
Vince-Smith
asked this question in
Q&A
Macro Help
#10558
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm struggling to understand the intended use of
macros
and was hoping someone could point me in the right direction.A place these seemed useful to me was to dynamically override years in my defaults/examples.
Unfortunately, I'm finding that neither
modelPropertyMacro
norparameterMacro
seem very well suited for this despite them being documented as having that purpose...For example you can't introspect the path you're in, so if you want to modify a parameter you can only do so by it's name which effects everything in the entire document. Even though an
operation
is passed in toparameterMacro
, if there's conditional logic tied to the key that produced that object then it's useless.modelPropertyMacro
has similar problems in that you are given the property but not the name of the property, making it impossible to implement conditional dynamic examples.And finally I can't for the life of me figure out what the default return value is supposed to be...
It seems like I should be doing something like
return parameter.default ?? parameter.value
as my fallback but I can't tell if that's the intent.Am I using these macro's completely wrong??
Beta Was this translation helpful? Give feedback.
All reactions