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: 

pipe network structure label

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
CADmgrMike
796 Views, 9 Replies

pipe network structure label

We have a block that we use for an eccentric manhole that shows the lid offset. (see pic)

I would like to create a label that displays the rotation of the structure with N,S,E,W like you can with the pipe direction field.

Has anyone ever tried this?

Mike Porter
https://provostandpritchard.com/
9 REPLIES 9
Message 2 of 10
~Opie
in reply to: CADmgrMike

There is a Structure Rotation Angle option for Structure labels.
Message 3 of 10
CADmgrMike
in reply to: ~Opie

Yes, I have played around with that field a bit, but haven't gotten it to display the data as N,S,E,W.

Mike Porter
https://provostandpritchard.com/
Message 4 of 10
~Opie
in reply to: CADmgrMike

You could create an Expression to convert this field to return a Direction. However, you will still have a number to deal with.
Message 5 of 10
CADmgrMike
in reply to: ~Opie

I like your idea.

Not sure what you mean by having a number to deal with?

I"ll give it a try and see what I can do.

Thanks.

Mike Porter
https://provostandpritchard.com/
Message 6 of 10
Bill_Myron
in reply to: CADmgrMike

Expressions cannot return strings. Such as N, S, E, W.

 

There is a terrible workaround though.

Create 4 expressions (8 if you want NW, NE, SW, SE). These will be if statments.

 

If the the rotation of the structure falls within the Dierection range

 

=IF(AND(Structure Rotation>XX,YY>Structure Rotation),(Whatever your text hieght is),0.00001)

 

Make however many of those you need for each direction. In your label add a text component for each direction. Place them all in the same place on top of each other. Apply the coresponding expression to each text.

Now when you rotate your structure it will only display the correct direction. All the other directions will be sooo small you wont even notice them.

 

Hope this makes sense!

Message 7 of 10
Joe-Bouza
in reply to: CADmgrMike

Hi Bill
Not sure I follow the "And" in your code. Could you elaborate ?
Thanks

Your Name
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 10
~Opie
in reply to: CADmgrMike

Here is a thread discussing this same concept Bill is referring to. http://forums.autodesk.com/t5/AutoCAD-Civil-3D-General/text-in-style-expression/td-p/2893280
Message 9 of 10

It think this drawing has a better example of what you want: http://style.civil3dreminders.com/structurelabel-pipedirection

Message 10 of 10
Bill_Myron
in reply to: Joe-Bouza

So I may ahve spoke too soon about the and, apparently it is not included with Civil 3D. BUT, there is a way to get this done still. There are other ways to get an "AND" in the expression to get the range.

 

From the help on on expressions under operators:

Logical operators return 1.0 for true and 0.0 for false. Since they return values, you can perform logical AND and OR with addition and multiplication. For example: ((a<b) + (b>c)) tests for a < b or b > c. ((a<b)*(b>c)) tests for a<b and b>c.

So if we apply these in our IF statement we will get the desired result. 
Our North is 90 so these are written for that direction. If your directions are different, adjust accordingly.
 
Ranges:

East - 315 to 45

North - 45 to 135

West - 135 to 225

South - 225 to 315

 

Expression:

IF(({Structure Rotation Angle}>DEG2RAD(135))*({Structure Rotation Angle}<DEG2RAD(225)),TEXT HEIGHT,0.000001)

 

This tests if the angle is greater thatn 135 AND less than 225.

 

For the range that crosses th 0 degree you will ahve to change the "AND" to an "OR".

 

IF(({Structure Rotation Angle}>DEG2RAD(315))+({Structure Rotation Angle}<DEG2RAD(45)),TEXT HEIGHT,0.000001)

 

Each direction will need its own text component and expression.

 

I made a quick label in a drawing and attatched it.

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report