Summary: Use Change text case in multi-leader
Description: Be able to utilize the changetextcase express tool within multi-leaders.
Product and Feature: AutoCAD Civil 3D - Other
Submitted By: M Hooker on 06/21/2013
|
Summary: Use Change text case in multi-leader
Description: Be able to utilize the changetextcase express tool within multi-leaders.
Product and Feature: AutoCAD Civil 3D - Other
Submitted By: M Hooker on 06/21/2013
Firstly, this wish should apply to AutoCAD, and all AutoCAD-based verticals will inherit the enhancement.
In the interim, while we wait for Autodesk to incorporate this into the application, you could code a .NET plug-in which implements a ContextMenuExtension which registers a PopUp Event handler, filtering Editor.SelectImplied().Value for AcDbMLeader only, and if that criteria is met, enables a context (right-click) menu item which allows you to change the case.
Now, I suspect that you will not be able to call the Express Tool via SendStringToExecute() (speculation on my part), but you could certainly roll your own, which would allow for both UPPER, lower, and Sentence cases. Text formatting may present a few speed bumps.
As one small example of a custom context menu, see this, and this post.
[Edit] - For reference, here's a link on How to convert strings to lower, upper, or title (proper) case by using Visual C#.
[Edit] - You'll also have to account for ContentType (i.e., MText or Attributed Block, etc.).
Last edited by BlackBox; 2013-06-26 at 05:45 AM.
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000
:: Update ::
I've made a fair amount of progress on granting this wish.
So far, I've implemented a right click (context) menu, which properly filters for only DBText, MText, and MLeader implied selection (otherwise disabled), and successfully changes text string case between lowercase, Sentence case, Title Case, and UPPERCASE... At this time, MLeader support is relegated to MLeader.ContentType.MTextContent.
Things still on my to-do list, are add support for tOGGLE cASE, and MLeader.ContentType.BlockContent (specifically, nested AttributeDefinitions)... Then this will be ready for publish at Autodesk Exchange.
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000
Here's a couple of screenshots I neglected to attach to my earlier post:
bbox_RightClickChangeCase.titlecase.before.png bbox_RightClickChangeCase.titlecase.after.png
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000
tOGGLE cASE has been implemented....
My only concern, is that I am unsure how this may, or may not affect formatted text string values.
Autodesk exposes TextEditor.CreateTextEditor(MText mtext), which I've employed for both AcDbMText, and the MText Property Object of AcDbMLeader (where mleader.ContentType == ContentType.MTextContent), but unfortunately, this TextEditor does not support DBText (AcDbText), nor AttributeReference Types.
Further, TextEditor is an ObjectARX Wrapped Type, as is TextEditorSelection, so I'm not entirely sure how to add Extension Methods to this (if it's even possible?)... More specifically, I can add an Extension Method, but getting that Extension Method to actually cause native ObjectARX to 'support' Types it currently does not, seems unlikely.
... More on TextEditor here.
/Update
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000
This wish has been reported as granted and already in the software.
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000
Is there any change on this? I'm having to convert drawings in ALL CAPS and TCASE doesn't work on multileaders. Having to individually highlight text, right click, to then change only to lowercase (uppercase being the only other option) is proving to be very labourious.