Assign Description to Variable

Assign Description to Variable - Messages

#1 Posted: 2022/10/24 13:30:58
Arie

Arie

94 likes in 285 posts.

Group: User

Is there a way to assign a description to a variable dynamically?

I am defining variable names dynamically. I would like to also assign a description with each variable name.
Is this possible?

Thanks
File not found.File not found.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#2 Posted: 2022/10/24 14:50:41
churichuro

churichuro

28 likes in 79 posts.

Group: User

I think not, there is the inverse function to what you are looking for...

description("VAR" ) that returns the description of the VAR variable

but it can't be done
description("VAR" ) := "new description"

it's a nice feature to ask for to be implemented in this bidirectional way.
#3 Posted: 2022/10/25 06:44:38
Oscar Campo

Oscar Campo

135 likes in 309 posts.

Group: Moderator

Wrote

Is there a way to assign a description to a variable dynamically?

I am defining variable names dynamically. I would like to also assign a description with each variable name.
Is this possible?

Thanks
File not found.File not found.



A matrix approach:

AssignValueAndDescription.png
AssignValueAndDescription.sm (7.5 KiB) downloaded 678 time(s).
2 users liked this post
Arie 2022/10/26 09:59:00, Alvaro 2022/10/26 14:26:00
#4 Posted: 2022/10/26 09:26:46
Arie

Arie

94 likes in 285 posts.

Group: User

I had another idea using line function. But i'm not sure how to do it programatically... Any Ideas? Is it even possible?

Untitled.png
Worksheet8_alternateIdea.sm (22.9 KiB) downloaded 700 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
1 users liked this post
⚜ Kenny Lemens, P.E. ᵂᴵ 2022/10/26 10:57:00
#5 Posted: 2022/10/26 09:40:21
Arie

Arie

94 likes in 285 posts.

Group: User

Aha! I figured it out

Untitled.png

I'm pretty happy with this solution.
Here's my updated file for a reference:
Untitled.png

File not found.File not found.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
2 users liked this post
⚜ Kenny Lemens, P.E. ᵂᴵ 2022/10/26 11:32:00, Alvaro 2022/10/26 14:29:00
#6 Posted: 2022/10/26 10:31:42
Oscar Campo

Oscar Campo

135 likes in 309 posts.

Group: Moderator

Wrote

Aha! I figured it out



Great!! congrats
  • New Posts
  • No New Posts