AutoCAD Civil 3D
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Include Text in Expression.
I need include one text in Expression for AutoCAD Civil 3D
My Expression: IF({Asymmetric Length 1}>1,({K Value}/{Profile Curve Length}*{Asymmetric Length 1}),-1)
I need this Expression: IF({Asymmetric Length 1}>1,(k1:{K Value}/{Profile Curve Length}*{Asymmetric Length 1}),-1)
K1 is Text for indicate the result for expression. I can not include this text in outside label because, while =-1, the label is invisible.

*Expert Elite*
MaxiCAD Informática
www.maxicad.com.br
Solved! Go to Solution.
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Are you trying to plug a result of -1 in as a text height?
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
No. The expression already does what I need. But I want the same expression I can have a text.

*Expert Elite*
MaxiCAD Informática
www.maxicad.com.br
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Rather than try to add text in the expression, you can add text to the label style.
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi.

*Expert Elite*
MaxiCAD Informática
www.maxicad.com.br
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Make two expressions. Make two components in your label style.
The expression that evaluates to -1 should return a positive value (text height) if true and 0 if false. Build your label component, adding the additonal text KB, and for Text Height, click the drop down list within Text Height and pick this expression.
The other expression should return positive if the result is not -1 and 0 if it is. Add another component to the label style, this time without the extra text KB. In the Text Height drop down, pick this expression.
Each expression will force a component to have a positive text height or 0.
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Tim has it. You cannot have conditional strings, but you can have conditional expression to set the text height like the ubiquitous cut and fill labels that get bandied about here
Joseph D. Bouza, P.E. (one of 'THOSE' People) Civil 3D 2012 & 2013
HP Z210 Workstation
Intel Xeon CPU E31240 @ 3.30 Hz
12 GB Ram
Note: Its all Resistentialism, so keep calm and carry on

64 Bit Win7 OS
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello everyone.
The problem is as follows:
The expression rode doing what I need. But I need to include a label before the dynamic expression. Eg
If the expression result is positive then the label informs K1 = value of the expression.
If the expression result is negative then the label is not displayed.
The expression profile for curves: IF({Asymmetric Length 1}>1,({K Value}/{Profile Curve Length}*{Asymmetric Length 1}),-1).
Thanks

*Expert Elite*
MaxiCAD Informática
www.maxicad.com.br
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
As others have stated, an expression will ONLY return a number. You cannot get an expresson to return text in any way shape or form. Can't be done. No way to do it. Impossible.
The only workaround we currently have is to return a value for the height of the text. If the expression is true, return a valid height for the label component. If the expression is false, return a really really small height for the text. Now use that in the height field for the label component.
Re: Include Text in Expression .
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello,
I already know that an expression can only return number. My appointment was for friends to see if some had already found a solution for this.
Thank you, all.

*Expert Elite*
MaxiCAD Informática
www.maxicad.com.br



