Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

structure expression

22 REPLIES 22
Reply
Message 1 of 23
CADmgrMike
385 Views, 22 Replies

structure expression

I would like to make a structure label that shows the offset if it is greater than 0, but doesn't if it is a 0 offset.

I can't figure out how to remove the offset if is is 0.

 

Thanks.

Mike Porter
https://provostandpritchard.com/
22 REPLIES 22
Message 2 of 23
Jay_B
in reply to: CADmgrMike

Hi Mike,

 

One way to do so is to create an expression which makes the text height very tiny so it doesn't show up when plotted.

 

Expression used

IF({Structure Offset}<0.001,0.00001,0.12/12)

Which is used for text height value for text component "Structure Offset" within the structure label style.

 

Tutorial drawing with a very crude but working example attached.(see purple structure labels).

 

 

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 3 of 23
Jay_B
in reply to: CADmgrMike

I realized after posting the example expression provided will also exclude any left or negative offsets.

The expression would need to be revised to allow for both >0.001 and <-0.001 to do what your after.

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 4 of 23
Joe-Bouza
in reply to: CADmgrMike

Another way: set the expression to be -1 if false, and in the expression composer select hide negative values. We  do this on our structure tables to discern between leaching basins and other structures.

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 5 of 23
CADmgrMike
in reply to: Jay_B

Jay,

I see how you accomplished it, but it doesn't work when the label is dragged.

Looking at the dragged state tab, the "text height" doesn't allow you to use the expression.

That's a bummer. The labels are almost always dragged somewhere.

Mike Porter
https://provostandpritchard.com/
Message 6 of 23
CADmgrMike
in reply to: Joe-Bouza

Joe,

Can you post an example?

I'm just getting into creating expressions. don't have a good handle on it yet.

 

Thanks.

Mike Porter
https://provostandpritchard.com/
Message 7 of 23
Joe-Bouza
in reply to: CADmgrMike

Sure Mike

 

this is an expression that looks at the structure floor thickness to determine "what" type of structure it is looking at and lables accordingly

 

IF({Floor Thickness}=0.5,-1,IF({Floor Thickness}=3.0,{Insertion Rim Elevation}-2.67,IF({Floor Thickness}=5.5,{Insertion Rim Elevation}-5.5,-1)))

 

 

 

the dialog shows how to set negative values in the lable style

expression.png

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 8 of 23
CADmgrMike
in reply to: Joe-Bouza

Joe,

I think I see how this expression works, but in my case wouldn't the -1 remove the offset value for all structures on the left side of an alignment?

That side is considered a negative offset.

Mike Porter
https://provostandpritchard.com/
Message 9 of 23
Joe-Bouza
in reply to: CADmgrMike

then take the other route:

if(offset=0,-1,<textheight>, no? 🙂

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 10 of 23
Jay_B
in reply to: CADmgrMike

Mike,

 

Pretty sure it's doable, but what needs to happen AFAIK, is have the < 0.001 & > -0.001 all in same expression.

 

Had it close to working but haven't had any more time to look at it.

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 11 of 23
CADmgrMike
in reply to: Jay_B

On the Layout tab, each individual component has a "text height" setting, but on the dragged state tab, all components are lumped into one "text height" setting.

I got your original expression to work by changing it to IF {structure offset}=0........

It would show the offset for both left and right side of the alignment, but the dragged state changes everything because then it's reading the text height from the Dragged State tab and not the Layout tab.

 

Mike Porter
https://provostandpritchard.com/
Message 12 of 23
Joe-Bouza
in reply to: CADmgrMike

That is disheratening to hear.Smiley Frustrated

 

If you could just label the structure ID in plan and use a table you'l be golden. Perhaps you could work a x,y offset ito the style so you don't have to drag it?

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 13 of 23
Jay_B
in reply to: CADmgrMike


mikepo wrote:

I got your original expression to work by changing it to IF {structure offset}=0........

It would show the offset for both left and right side of the alignment, but the dragged state changes everything because then it's reading the text height from the Dragged State tab and not the Layout tab.

 


Hi Mike,

If I use you're simplified expression (kudos to you for simplifying), it seems to work ok in the dragged state.

IF({Structure Offset}=0,0.00001,0.12/12)

 

Unless I'm missing something, if Display is set to "As Composed" instead of "Stacked Text" on dragged state tab, then

the text height options are greyed out & seems to read the Layout tab text height value.

 

Not sure if the "As composed" option works in your case?

 

See attached.

 

 

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 14 of 23
CADmgrMike
in reply to: Jay_B

Yes, we're getting closer.

I think I might be able to get the "As Composed" to work.

It does create an extra step if you want to drag the label to the left instead of the right.

You have to move the leader vertex.

See attached pic for end result.

 

Thanks for all your help.

Mike Porter
https://provostandpritchard.com/
Message 15 of 23
Bill_Myron
in reply to: CADmgrMike

Joe-Bouza had the right idea, was just missing one step.

 

This expression will work for what you want to do. Even as stacked text.

 

Because you show the offset as Left or Right and not the actual + or -, all you need to the Absolute value of the offset. This will make your offsets all positive and if there is no offset, -1.

 

IF({Structure Offset}=0,-1,ABS({Structure Offset}))

 

Make sure to hide negative values.

 

 

Message 16 of 23
CADmgrMike
in reply to: Bill_Myron

I'm not getting the 0.0 offset to go away using your expression, and it also makes the other offset text very large.

Using "hide negative values" removes the left offset. I'm using "drop negative sign" and that works.

Mike Porter
https://provostandpritchard.com/
Message 17 of 23
Joe-Bouza
in reply to: Bill_Myron

Thanks Bill

I could see what I missed, but it worked perfect once the ABS was added

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 18 of 23
Joe-Bouza
in reply to: CADmgrMike

Mike
use this expression in tha actual component for offset not the text height. keep the the text height the printed height you need. works perfect with stacked text - no need to monkey aroung with the leader

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 19 of 23
CADmgrMike
in reply to: Joe-Bouza

Works perfect!

Then I had to go and complicate it. Smiley Frustrated

We need to see brackets, offset side, a T, and add the apostrophe for the foot sign. (see attached pic)

 

Thanks for all your help.

I have to dig into this and educate myself.

Mike Porter
https://provostandpritchard.com/
Message 20 of 23
Jay_B
in reply to: CADmgrMike


@CADmgrMike wrote:

We need to see brackets, offset side, a T, and add the apostrophe for the foot sign. (see attached pic)


Mike, the LT / RT abbreviations are read from Drawing Settings > Abbreviations Tab.

 

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report