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: 

RText Code

10 REPLIES 10
Reply
Message 1 of 11
BigBudha
1695 Views, 10 Replies

RText Code

Been searching for the code to do a couple different things in Rtext. I'd like to get the code/commad for the date in this format - MON DD"," YYYY. But I'd like the 3 month letters to be capitalized and the entire string underscored.

 

I can get the 3 - month letters capitalized, but then it cuts off the year and I have yet to get the underscore code to work.

 

I'm using Civil 3D 2013.

 

Thanks for any help.

 

 

 

 

10 REPLIES 10
Message 2 of 11
troma
in reply to: BigBudha

Does it have to be RTEXT?

We use Mtext with a Diesel expression in a field:  $(edtime, 0, MON DD"," YYYY)

I just checked, and it will underline no problem, but I'm not sure how to get it capitalized.


Mark Green

Working on Civil 3D in Canada

Message 3 of 11
doni49
in reply to: troma


@troma wrote:

Does it have to be RTEXT?

We use Mtext with a Diesel expression in a field:  $(edtime, 0, MON DD"," YYYY)

I just checked, and it will underline no problem, but I'm not sure how to get it capitalized.


One of the options in the field editor is to CAPITALIZE the text.  Check for "Formatting".

 

Here's a snippet from the acad docs:

Format List

Lists options for display of the value of the field. For example, date fields can display the name of the day or not, and text strings can be uppercase, lowercase, first capital, or title case. The value displayed in the Fields dialog box reflects the format that you select.

 



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 4 of 11
doni49
in reply to: troma

Also--you don't need diesel to do this.  OOTB Acad has a field already defined for that.  It's under the "Document Information" section on the left hand side of the Fields dialog.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 5 of 11
troma
in reply to: doni49

I didn't like the way the regular Mtext field updated—or more to the point, didn't update.  That's why I went with Diesel.  And I don't see a way to get either the Diesel or the regular Mtext field to be capatalized.  I'm working in 2011, perhaps it's been improved since?


Mark Green

Working on Civil 3D in Canada

Message 6 of 11
doni49
in reply to: troma


@troma wrote:

I didn't like the way the regular Mtext field updated—or more to the point, didn't update.  That's why I went with Diesel.  And I don't see a way to get either the Diesel or the regular Mtext field to be capatalized.  I'm working in 2011, perhaps it's been improved since?


I'm using 2012 and we've not had any trouble with it updating.  So it very well may be fixed since your version.



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 7 of 11
doni49
in reply to: doni49

if you're going to use Diesel, this is a link to Diesel's "UPPER" function.

 

http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/files/WS73099cc142f48755...



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 8 of 11
BigBudha
in reply to: BigBudha

Thanks for the help, I'll try them and see what works best.

Message 9 of 11
BigBudha
in reply to: BigBudha

I couldn't get it to work the way I wanted it to in "Field" or the other suggestions, so I just played with the strings in RText.

 

Came up with this - $(upper, $(edtime, $(getvar, date),MON DD)), $(edtime, 0,YYYY) = MAR 12, 2013

 

As i said in the OP, I could get the upper to work on the month but then it would cut off the year, so I ended the code after the day then added another code for the year. Seems to be working the way I want it to. The main thing was the underscore, which after searching here and other places, I couldn't get to work. So in the meantime, I'll use a static line instead.

 

Thanks for the help!

Message 10 of 11
doni49
in reply to: BigBudha

Give the following link a read.  I've never tried this myself so I can't tell you what kind of results you'll see, but it looked like it might help.

 

http://www.cadforum.cz/cadforum_en/qaID.asp?tip=4325



Don Ireland
Engineering Design Technician




If a reply solves your issue, please remember to click on "Accept as Solution". This will help other users looking to solve a similar issue. Thank you.


Please do not send a PM asking for assistance. That's what the forums are for. This allows everyone to benefit from the question asked and the answers given.

Message 11 of 11
scrowley707
in reply to: BigBudha

Big Budha: I don't know if you figured it out yet but your comma is messing up the date and the code gets confused cause it thinks you are changing a function and doesn't display anything after that. If you would like a comma after the day you will have to use this code as far as I can tell: displaying the full month uppercase: $(upper,$(edtime, $(getvar, date),MONTH DD)), $(edtime, $(getvar, date),YYYY) displaying the first 3 characters of the month: $(upper,$(edtime, $(getvar, date),MON DD)), $(edtime, $(getvar, date),YYYY)

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

Post to forums  

Rail Community


Autodesk Design & Make Report