+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
  1. #1
    Super Member rustysilo's Avatar
    Computer Details
    rustysilo's Computer Details
    Operating System:
    WinXP
    Discipline
    Civil
    rustysilo's Discipline Details
    Occupation
    Senior CAD Draftsman
    Discipline
    Civil
    Using
    Civil 3D 2008
    Join Date
    Jul 2007
    Location
    Jacksonville, FL - USA
    Posts
    1,458

    Default Macro for "clicking" OK in dialogue

    Registered forum members do not see this ad.

    What would the macro be (not necessarily lisp) for accepting or otherwise "clicking" the OK button of a dialogue box?
    "Constantly choosing the lesser of two evils is still choosing evil." ~ Jerry Garcia
    flickr |
    work | blog | creed
    rustysilo's tips & tutorials

  2. #2
    LElkins
    Guest

    Default

    What exactly are you trying to acheive?

  3. #3
    Super Member rustysilo's Avatar
    Computer Details
    rustysilo's Computer Details
    Operating System:
    WinXP
    Discipline
    Civil
    rustysilo's Discipline Details
    Occupation
    Senior CAD Draftsman
    Discipline
    Civil
    Using
    Civil 3D 2008
    Join Date
    Jul 2007
    Location
    Jacksonville, FL - USA
    Posts
    1,458

    Default

    I'm creating a toolbar which calls a lisp file and at the end the lisp initiates a pop-up dialog. I need the code for my toolbar to accept and dismiss the pop-up dialog so I can add to my macro and run other commands.
    "Constantly choosing the lesser of two evils is still choosing evil." ~ Jerry Garcia
    flickr |
    work | blog | creed
    rustysilo's tips & tutorials

  4. #4
    Senior Member mahahaavaaha's Avatar
    Using
    AutoCAD 2009
    Join Date
    Jul 2007
    Location
    Finland
    Posts
    340

    Default

    I think you'd be best off learning VBA:

    Sub YeaNo()
    Dim Answer As String
    response = MsgBox("What say; YOu or NAy?", vbYesNo)
    If response = Yes Then
    Answer = Yes
    Else
    Answer = No
    End If
    End Sub
    Life is what happens to you while you're busy making other plans.
    John Lennon (1940 - 1980)

  5. #5
    Super Member rustysilo's Avatar
    Computer Details
    rustysilo's Computer Details
    Operating System:
    WinXP
    Discipline
    Civil
    rustysilo's Discipline Details
    Occupation
    Senior CAD Draftsman
    Discipline
    Civil
    Using
    Civil 3D 2008
    Join Date
    Jul 2007
    Location
    Jacksonville, FL - USA
    Posts
    1,458

    Default

    But all I need to know is how to dismiss this dialogue box. A macro/string of text that would essentially = clicking OK, Esc, or Enter
    "Constantly choosing the lesser of two evils is still choosing evil." ~ Jerry Garcia
    flickr |
    work | blog | creed
    rustysilo's tips & tutorials

  6. #6
    Senior Member mahahaavaaha's Avatar
    Using
    AutoCAD 2009
    Join Date
    Jul 2007
    Location
    Finland
    Posts
    340

    Default

    Oh you mean there is a dialog Yes/No that comes from an AUtoCAD Command that you'd like to by-pass? Try EXPERT?

    /Petri
    Life is what happens to you while you're busy making other plans.
    John Lennon (1940 - 1980)

  7. #7
    Super Member rustysilo's Avatar
    Computer Details
    rustysilo's Computer Details
    Operating System:
    WinXP
    Discipline
    Civil
    rustysilo's Discipline Details
    Occupation
    Senior CAD Draftsman
    Discipline
    Civil
    Using
    Civil 3D 2008
    Join Date
    Jul 2007
    Location
    Jacksonville, FL - USA
    Posts
    1,458

    Default

    Well it's simply an alert box with an OK button that's part of a lisp file, but more or less the same sort of deal I guess.
    I just removed that part from the lisp file so I don't have to figure this out, although it would still be nice to know for future reference.
    Thanks.
    "Constantly choosing the lesser of two evils is still choosing evil." ~ Jerry Garcia
    flickr |
    work | blog | creed
    rustysilo's tips & tutorials

  8. #8
    Senior Member wizman's Avatar
    Using
    AutoCAD 2009
    Join Date
    Nov 2007
    Location
    Abu Dhabi / Philippines
    Posts
    408

    Default

    insert in your macro file the alert function
    ex.
    Code:
     
    ^C^C(ALERT "HELLO WORLD")
    Last edited by wizman; 1st Mar 2008 at 05:52 pm.

  9. #9
    Super Member rustysilo's Avatar
    Computer Details
    rustysilo's Computer Details
    Operating System:
    WinXP
    Discipline
    Civil
    rustysilo's Discipline Details
    Occupation
    Senior CAD Draftsman
    Discipline
    Civil
    Using
    Civil 3D 2008
    Join Date
    Jul 2007
    Location
    Jacksonville, FL - USA
    Posts
    1,458

    Default

    No. I don't want to know how to create the alert box. I want to know how to dismiss one. What is the code to dismiss an alert box that pops up as a result of a previous function within the macro coding? Is there a macro code that will do this?
    "Constantly choosing the lesser of two evils is still choosing evil." ~ Jerry Garcia
    flickr |
    work | blog | creed
    rustysilo's tips & tutorials

  10. #10
    Super Member fixo's Avatar
    Computer Details
    fixo's Computer Details
    Operating System:
    Windows 7
    Motherboard:
    E7500
    CPU:
    Intel(R)Core(TM)2 DUO CPU 2.93HGz
    RAM:
    4098 Gb
    Graphics:
    1024 Gb
    Using
    AutoCAD 2009
    Join Date
    Jul 2005
    Location
    Pietari, Venäjä
    Posts
    1,613

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by rustysilo View Post
    No. I don't want to know how to create the alert box. I want to know how to dismiss one. What is the code to dismiss an alert box that pops up as a result of a previous function within the macro coding? Is there a macro code that will do this?
    Take a look at system variable EXPERT

    Setting EXPERT can affect scripts, menu macros, AutoLISP, and the command functions.

    ~'J'~
    The soul is healed by being with children. - Fyodor Dostoyevsky, novelist (1821-1881)

Similar Threads

  1. macro to plot multiple "pages" to pdf
    By wmw99a in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 8th Jan 2008, 06:59 pm
  2. Why do people use a "," rather than a "." as a decimal point?
    By Tempest in forum AutoCAD Beginners' Area
    Replies: 36
    Last Post: 10th Nov 2007, 12:32 am
  3. "LINK template" icons "greyed out" -why?
    By Chrisjpritchard in forum AutoCAD Drawing Management & Output
    Replies: 0
    Last Post: 2nd Mar 2007, 10:25 pm
  4. scaling in "architectural" & "decimal"
    By maze in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 15th Feb 2007, 04:55 pm
  5. "Union" Meshes or "Slice" 3D Mesh
    By Peter31712 in forum AutoCAD 3D Modelling & Rendering
    Replies: 1
    Last Post: 29th Apr 2004, 11:11 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts