.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD command prompt text disapear

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
andre_adc-dao
842 Views, 4 Replies

AutoCAD command prompt text disapear

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é

 

4 REPLIES 4
Message 2 of 5

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 5

You're a king!!!!

 

Best regards,

 

André

Message 4 of 5
norman.yuan
in reply to: andre_adc-dao

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

Drive CAD With Code

EESignature

Message 5 of 5

Hi Norman,

 

>> you can do it even easier with

have you seen my first option in my post?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost