TheSwamp
Code Red => .NET => Topic started by: jtoverka on August 07, 2023, 11:53:26 AM
-
Does anyone know a reference, or could provide a reference to all text formatting codes that one may find in MTEXT or MLeaders?
I am looking for an exhaustive list or something close.
-
Perhaps look at for a start:
https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-ECEEF65E-C327-44B8-AFB9-C0ACA2CAEF55
https://adndevblog.typepad.com/autocad/2017/09/dissecting-mtext-format-codes.html
https://www.keanw.com/2010/06/creating-an-autocad-mtext-object-containing-different-colours-using-net.html
https://help.autodesk.com/view/ACDLT/2023/ENU/?guid=GUID-7D8BB40F-5C4E-4AE5-BD75-9ED7112E5967
If you require something specific, please ask.
Regards,
-
Hello;
I am in the same boat as jtoverka, I need a comprehensive list of Mtext codes. A partial list just will not cut it as my task is to take an Mtext string from Autocad and convert it to a formatted string in Revit.
After scouring the internet for some 4 hours now, I think such a reference is not to be found outside of some office at Autodesk.
Michelle
-
I do not have Revit, so I cant test, but what programming options are available in Revit? Maybe LISP or .Net or even VBA (yes I said that outloud)
-
as a side thought, can you post some of the formatting from Autocad you want to convert?
-
Another 2 options
STRIPMTEXT . . . may be other sources . . need to translate the lisp.
https://www.theswamp.org/index.php?topic=31584.0
https://cadabyss.wordpress.com/2010/01/04/stripmtext-v5-0/
https://www.cadforum.cz/en/text-formatting-codes-in-mtext-objects-tip8640
-
Hello David:
Revit has a variety of programming interfaces: Dynamo (which can include Python nodes), Python via Revit Python Shell, compiled macros, and of course compiled add-ins. After bumping around a bit, I have sortof settled on Python & Revit Python Shell as it is an interpreted language and I have immediate access to Revit model. Unfortunately, RPS is not an environment like visualLisp - no real debugging support.
Note that I can drive Autocad from Revit but I cannot drive Revit from Autocad. So from Revit, I use Autocad's ActiveX interface to get at a DWG file.
Attach is a sample file with some Mtext. This is just a sample from a random file.
-
Good news is we have a Python expert here, who hopefully will see this and maybe can give a few ideas