Hi everybody,
I've developed a custom insert block command. The first one insert a block from a dialog box like the INSERT command. Everything work fine. Now I created a palette with a list of block. When I click one, my custom insertion command is issue. The block is insert correctly but after insert, the text "Command:" is not displaying at the command line (I see only the text issue by my command with WriteMessage) but I can type another command with no problem.
If I send an escape string, the text is back again but I see *cancel* at command line, so it is not very elegant.
Anybody have an idea?
Regards,
André
Solved! Go to Solution.
Solved by Alfred.NESWADBA. Go to Solution.
Hi,
depending on the AutoCAD release, for newer ones:
Autodesk.AutoCAD.Internal.Utils.PostCommandPrompt
if that does not exist, then for older releases
<DllImport("acad.exe", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode, EntryPoint:="?acedPostCommand@@YAHPB_W@Z")> _
Public Function acedPostCommand32(ByVal CommandStr As String) As Integer
End Function
<DllImport("acad.exe", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode, EntryPoint:="?acedPostCommand@@YAHPEB_W@Z")> _
Public Function acedPostCommand64(ByVal CommandStr As String) As Integer
End Function
HTH, - alfred -
Well, doing the P/Invoke gets what you want, you can do it even easier with the managed API equivalent directly:
Autodesk.AutoCAD.Internal.Utils.PostCommandPrompt();
Norman Yuan
Hi Norman,
>> you can do it even easier with
have you seen my first option in my post?
- alfred -