C3D-0136 · READ-ONLY: can the host create real text-along-curve [ARCTEXT-PROBE] error
Probes whether an ArcAlignedText/RText class is registered in this session, lists every registered class whose name mentions TEXT, and checks whether Editor.Command and Document.SendStringToExecute are reachable from a ticket script, to find a real text-along-a-curve path instead of the per-character workaround. Draws nothing.
C# payload
// READ-ONLY PROBE. Can this host create real text-along-a-curve instead of my per-character hack?
// Three candidates, each just tested for EXISTENCE - nothing is drawn.
// 1. RText / ArcAlignedText - the Express Tools ARCTEXT entity (AcadXText.arx / "ArcAlignedText")
// 2. Ed.Command(...) - can the script drive the ARCTEXT command at all
// 3. MText.Rotation-free alternatives already in the DB
// Nothing is modified.
Log("drawing: " + Db.Filename);
// (1) is the ArcAlignedText RXClass registered in this session?
foreach (string cls in new string[] { "AcDbArcAlignedText", "ArcAlignedText", "RText", "AcDbRText" }) {
try {
var rx = RXObject.GetClass(typeof(Autodesk.AutoCAD.DatabaseServices.Entity));
var c = RXClass.GetClass(typeof(Autodesk.AutoCAD.DatabaseServices.Entity));
Log("probe " + cls + ": base entity class ok (" + c.Name + ")");
break;
} catch (System.Exception ex) { Log("probe " + cls + ": " + ex.Message); }
}
// list every RXClass whose name mentions text, so an arc-text class shows up if it is loaded
Log("");
Log("=== registered classes mentioning TEXT ===");
try {
var d = SystemObjects.ClassDictionary;
foreach (DictionaryEntry de in d) {
string nm = de.Key.ToString();
if (nm.ToUpper().IndexOf("TEXT") >= 0) Log(" " + nm);
}
} catch (System.Exception ex) { Log("class dictionary: " + ex.Message); }
// (2) is Ed.Command reachable from a script?
Log("");
try {
var m = Ed.GetType().GetMethod("Command");
Log("Editor.Command exists: " + (m != null));
} catch (System.Exception ex) { Log("Editor.Command probe: " + ex.Message); }
try {
var m2 = Doc.GetType().GetMethod("SendStringToExecute");
Log("Document.SendStringToExecute exists: " + (m2 != null));
} catch (System.Exception ex) { Log("SendStringToExecute probe: " + ex.Message); }
// (3) is the express tools arx loaded?
Log("");
Log("ARCTEXT command defined: " + (Autodesk.AutoCAD.ApplicationServices.Application
.GetSystemVariable("CMDNAMES") != null ? "check manually" : "?"));
Result
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.