Sambo Posted February 3, 2020 Posted February 3, 2020 (edited) Hey Guys, I have created a bunch of lisp variables that look something like this "StageArea1", "StageArea2", ect What im wanting to do is create a field formula that links to these variable, but i want whatever area value it calls to be determined by the contents of a piece of text. My initial thoughts where something like this(or some variation of it): %<\AcVar.17.0 Lisp.StageArea(%<\AcObjProp Object(%<\_ObjId 2228256557344>%).TextString>%)>% With %<\AcObjProp Object(%<\_ObjId 2228256557344>%).TextString>% calling the contents of my piece of text, but this doesn't seem to work when i plug it into a Formula inside the field dialog box. Does anyone have any other ideas on how to do this? Edited February 3, 2020 by Sambo Quote
tombu Posted February 3, 2020 Posted February 3, 2020 As lisp values disappear every time a drawing is closed it wouldn't make any sense for there to be a way to use one as a reference in a drawing. Any Custom Properties you add are saved with the drawing and are easily referenced with fields. So there are ways to do what you want just not the way you're doing it. Quote
Lee Mac Posted February 3, 2020 Posted February 3, 2020 (edited) Whilst field expressions may be nested, the nesting can only occur in place of a value referenced by a field expression, a nested field expression cannot consitute part of the structure of its parent expression (e.g. part of the property name). As such, what you are looking to achieve is not possible following the method you have described. Edited February 3, 2020 by Lee Mac Quote
Stefan BMR Posted February 3, 2020 Posted February 3, 2020 AcExpr accepts lisp variable as well. Insert field, select "Formula", TYPE StageArea, insert field and point to the text content. 1 Quote
Lee Mac Posted February 3, 2020 Posted February 3, 2020 43 minutes ago, Stefan BMR said: AcExpr accepts lisp variable as well. That's a new one for me - many thanks for sharing @Stefan BMR, I stand happily corrected! Quote
Sambo Posted February 4, 2020 Author Posted February 4, 2020 Thanks @Stefan BMR that's a great solution and would have worked perfectly for me if my lisp variables for my stage areas weren't expressed as string like this "2.543ha" or "2435m2". I wasn't thinking straight last night when I was trying to do this. @Lee Mac & @tombu how would you guys go about doing this? Quote
BIGAL Posted February 5, 2020 Posted February 5, 2020 (edited) Mtext supports superscript, you can also try adding the squared as it extended key code U something. Will try to find now where is my book of key codes. Edited February 5, 2020 by BIGAL Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.