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.
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
@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
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
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
@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 you're going to use Diesel, this is a link to Diesel's "UPPER" function.
Don Ireland
Engineering Design Technician
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!
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