Jump to content

Using a Field Expression inside a Field Expression


Recommended Posts

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 by Sambo
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Lee Mac
Link to comment
Share on other sites

AcExpr accepts lisp variable as well.

Insert field, select "Formula", TYPE StageArea, insert field and point to the text content.


  • Like 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by BIGAL
Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...