How do I make line labeling styling that can adjust base on line length

How do I make line labeling styling that can adjust base on line length

jeff.wangD95HG
Collaborator Collaborator
1,138 Views
11 Replies
Message 1 of 12

How do I make line labeling styling that can adjust base on line length

jeff.wangD95HG
Collaborator
Collaborator

jeffwangD95HG_0-1681831063287.png

I basically want to create a general line label style that looks like the picture above. but I want it to adjust the spread distance base on percentage of the length of the line instead of a set value.

jeffwangD95HG_1-1681831211294.png

currently I just anchor it to end or beginning and set a specific x offset value

jeffwangD95HG_2-1681831282789.png

since there is an option to reference to general segment length ground I am wondering if there is a way to reference to it and do some calculation to it so that it automatically adjust base on the line length

0 Likes
Accepted solutions (3)
1,139 Views
11 Replies
Replies (11)
Message 2 of 12

MMcCall402
Mentor
Mentor

I'm not sure I'm understanding ....

 

Why not anchor to the middle?

 

Or are you looking to label one line segment with 3 values that are a percentage of the overall length and have each one centered in its portion of the segment?

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

Message 3 of 12

Christopher.Fugitt
Enthusiast
Enthusiast

Use an expression that does the math for you. The math would set the text height to be the size that shows up or really tiny so it doesn't show up. Then add a component for each distance you want to be labeled.

0 Likes
Message 4 of 12

ChrisRS
Mentor
Mentor
Accepted solution

I agree with @MMcCall402. More information would be helpful.

 

You can create expressions that are percentages of the line length and use those for X Offset values.

You would need an expression for each location you are interested in.

(You do not need expressions for Start, End, or Center.)

 

EDIT:
In your style, you will need a text component for each location.
Thanks to @MMcCall402  

 

Alternatively - You can use will need a separate style for each location.
This is a good time to use child styles.

ChrisRS_0-1681837092043.png

ChrisRS_1-1681837240467.png

Good Luck!

Christopher Stevens
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

0 Likes
Message 5 of 12

jeff.wangD95HG
Collaborator
Collaborator
label one line segment with 3 value. value 1 at approximately 15% of the length of the line, value 2 at approximate 50% (half way point), and value 3 at 85% of the length of the line
0 Likes
Message 6 of 12

jeff.wangD95HG
Collaborator
Collaborator

this is exactly what I was looking for.

I am not sure how to access that component of the UI nor do I know the key words to search to gain information

0 Likes
Message 7 of 12

ChrisRS
Mentor
Mentor

I'm glad to help. 

Note: I edited the original Message. You can use multiple components in one style.

Christopher Stevens
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

0 Likes
Message 8 of 12

jeff.wangD95HG
Collaborator
Collaborator

can you give me some quick screen shots on how to access the calculation menu for it to automatically fill in?

0 Likes
Message 9 of 12

ChrisRS
Mentor
Mentor
Accepted solution

ChrisRS_1-1681840400146.png
Shameless Plug Follows.

You may want to check out my Civil 3D Label series
over at the Autodesk Community Voices Blog.

Civil3d: leveraging Label Legerdemain! A Series
          1 ... Not Magic, but a Quest for Some Pret...
 

          2 ... "I Can See Clearly Now ..."   Better Visibility for Text Component Editor Contents Window

          3 ... When The Chips are Stacked Against You, Finesse the Stacked Formatting

Edit:  The 4th part is about Expressions and has been submitted for review, It should be published "soon."

          4 ... An Expression is An Expression is an Expression NOT!   Published 4023-04-21

ChrisRS_2-1681842308384.png


The expression calculations are not fully automatic.

 

Start in TOOLSPACE >>
Settings Tab >> Position to the proper branch

Right-click Expressions and select New...

ChrisRS_0-1681839940255.png

 

The New Expression form will be blank.

ChrisRS_3-1681843323391.png

 

Fill in the Name and Description field manually.

(The Name cannot be changed so avoid spelling errors.)

ChrisRS_4-1681843408155.png

 

If is best to choose properties and functions using the buttons and drop down lists. 

ChrisRS_7-1681843716882.png

 

Click OK to save.

Note: Click [Help] for some well written information.)

ChrisRS_6-1681843667142.png

 

I hope this answered your question.

Christopher Stevens
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

0 Likes
Message 10 of 12

MMcCall402
Mentor
Mentor
Accepted solution

For the placement of those expression values you could add 3 line components to the label style, anchor them from 'start' to 'end' and then specify a % value for their length.  Anchor the 3 expression values to their end points and then set the line components visibility to 'false'.

 

image.png

Mark Mccall 
CAD Mangler


EESignature


VHB - Engineering, Inc.

Message 11 of 12

jeff.wangD95HG
Collaborator
Collaborator

ok thanks this is an easy solution as well.

0 Likes
Message 12 of 12

ChrisRS
Mentor
Mentor

Great idea. I edited the original message to reflect this as the primary approach.

Christopher Stevens
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

0 Likes