(Eval (Read ))

(Eval (Read ))

Anonymous
Not applicable
267 Views
2 Replies
Message 1 of 3

(Eval (Read ))

Anonymous
Not applicable
Does anyone know a way to read a formula as text in a field and then run it
on some variable? It's similar to the following Lisp sample.

In lisp the following would use the variable panel_type to determine the
name of the variable to create.

(setq pnl_offs (eval (read (strcat "pnl" (itoa panel_type) "_offs"))))

I've done it before but I can't remember how. : (


Best regards,


Dale
0 Likes
268 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Actually it determines the name of the variable to read.

"Dale Levesque" wrote in message
news:5064997@discussion.autodesk.com...
Does anyone know a way to read a formula as text in a field and then run it
on some variable? It's similar to the following Lisp sample.

In lisp the following would use the variable panel_type to determine the
name of the variable to create.

(setq pnl_offs (eval (read (strcat "pnl" (itoa panel_type) "_offs"))))

I've done it before but I can't remember how. : (


Best regards,


Dale
0 Likes
Message 3 of 3

Anonymous
Not applicable
Dale,

Did you search this group ?
I know I read the same question several months back in this group. I searched and searched but did not find it.
If you find the solution would you please post it, I would like to add this to my bag of tricks.

Maximo
0 Likes