Thank you, Fatty.
I work with 2008, and there I get the wrong result. With your example when i
type " km" the MessageBox shows: "Result: 1000km" and not "Result: 1000 km".
Very strange. Does anyone have the same problem?
Roland
schrieb im Newsbeitrag news:5633520@discussion.autodesk.com...
Realy strange, your code works
for me in A2007
~'J'~
public class StringUtils
{
[CommandMethod("CTX")]
public static void SpaceText()
{
Document doc = acadApp.DocumentManager.MdiActiveDocument;
Editor ed = doc.Editor;
string s = "1000";
PromptStringOptions optString = new PromptStringOptions("\nPrefix: ");
optString.AllowSpaces = true;
PromptResult prString = ed.GetString(optString);
string p = prString.StringResult;
MessageBox.Show(string.Format("Result: {0}", s + p));
}
}