Revit All caps tool doesn't work...why?

Revit All caps tool doesn't work...why?

james.levieux
Advocate Advocate
806 Views
4 Replies
Message 1 of 5

Revit All caps tool doesn't work...why?

james.levieux
Advocate
Advocate

I've been super frustrated with Revit's terrible capitalization tool that only works half of the time, plus you need to enter the text box to make the change.  I decided to write a dynamo script to do this.  I was shocked to find that even though the script is working perfectly, it STILL fails to make the change to Revit...exactly HALF of the time!  What is going on?

 

 

0 Likes
807 Views
4 Replies
Replies (4)
Message 2 of 5

barthbradley
Consultant
Consultant
0 Likes
Message 3 of 5

james.levieux
Advocate
Advocate

I'm not trying to learn how to do it, I'm trying to figure out why it doesn't work.  As you can see from my screenshot, my dynamo is correctly feeding all lower case strings to the text notes, but you can also see that some of the text notes don't respond.  This is a chronic problem that occurs even when manually using the standard Revit All Caps command.  To me, this appears to be an obvious problem at the API level. 

 

The web is littered with suggestions to copy and past text into Word and then copy-paste back into Revit because this feature doesn't work, but I've found no other better solutions.  I'll post this on the API forum an share if anything come up.

0 Likes
Message 4 of 5

barthbradley
Consultant
Consultant

@james.levieux wrote:

I'm not trying to learn how to do it, I'm trying to figure out why it doesn't work.  As you can see from my screenshot, my dynamo is correctly feeding all lower case strings to the text notes, but you can also see that some of the text notes don't respond. 


 

 

Yes, I can clearly see that some of the text notes "don't respond", which leads me to believe there in a problem with the DYN routine.  Hence, the reason I posted that video.  

 

Regarding your general displeasure with text creation/editing in Revit, I don't know what to say. There have been advances over the years, but still, Revit isn't a word processing software. We just learn to love to her shortcomings as well as her strengths.  That being said, I've never had an issue with typing upper or lower casing in Revit. If that's your issue, maybe a cookie crumb is stuck under the Shift or Caps Lock key on your keyboard.  😉   

 

Just kidding. Good Luck.  

 

 

 

0 Likes
Message 5 of 5

james.levieux
Advocate
Advocate

I've figured out what going on and can now replicate the issue.  Revit doesn't actually change the text in the database.  It saves the text as-typed and applies some crap internal program that converts it's "status" to uppercase or lowercase case as you can see from the screenshot.  Unfortunately, when text is originally entered into Revit using UPPER CASE the internal case-switching program fails.

 

The Revit All Caps is dumb tool that really can only change to UPPER CASE.  The tool assumes that you've entered the text in lower case. Then, when you apply the program it does indeed change the text appearance to uppercase, and when the tool is re-applied, it will just feed you back what you originally typed in.  This is why nothing appears to happen when you type directly using all caps.  This behavior is very evident in the attached screen clip.

 

Even though this explains why that All Caps program is a dud, it doesn't explain why the Dynamo program doesn't work.  In the screenshot from my original post you can clearly see that all the text strings are correctly coverted to lower case--then directly entered into the text note's text parameter--so you'd think that would result in the correct appearance. I think the problem must be is that my dynamo program doesn't change the "status" of the text note. Anybody know if that's changeable by dynamo or C#?

 

Revit text is very dumb indeed.

 

James

 

 

 

 

 

Dynamo, ens