Jump to content
Sambo

Using a Field Expression inside a Field Expression

Recommended Posts

Sambo

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?

 

image.thumb.png.3ee312019f34df214954de16509e4fb8.png

Edited by Sambo

Share this post


Link to post
Share on other sites
tombu

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.

Share this post


Link to post
Share on other sites
Lee Mac

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

Share this post


Link to post
Share on other sites
Stefan BMR

AcExpr accepts lisp variable as well.

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

image.thumb.png.98030d7cbc93235993ab082067fdcc55.png

  • Like 1

Share this post


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

Share this post


Link to post
Share on other sites
Sambo

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?

Share this post


Link to post
Share on other sites
BIGAL

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

Share this post


Link to post
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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...