.NET c# send command synchron - AcDoc.Editor.Command
Posted: Tue Nov 03, 2020 11:45 am
Hi All,
//----------------------------------------------------
[CommandMethod("solp")]
public static void solp()
{
Document AcDoc = Application.DocumentManager.MdiActiveDocument;
AcadFuncVer.SwitchToModelSpace();
string CmdTxt = @"solprof all Yes No Yes Ja"; // Ja --- because german version
// AcDoc.SendStringToExecute(CmdTxt, true, true, true); it works but asyncron
AcDoc.Editor.Command(CmdTxt); // don't work
}
//----------------------------------------------------
An example it need a "Return" is helpfull to.
Thanks in advance.
//----------------------------------------------------
[CommandMethod("solp")]
public static void solp()
{
Document AcDoc = Application.DocumentManager.MdiActiveDocument;
AcadFuncVer.SwitchToModelSpace();
string CmdTxt = @"solprof all Yes No Yes Ja"; // Ja --- because german version
// AcDoc.SendStringToExecute(CmdTxt, true, true, true); it works but asyncron
AcDoc.Editor.Command(CmdTxt); // don't work
}
//----------------------------------------------------
An example it need a "Return" is helpfull to.
Thanks in advance.