Announcement

Collapse
No announcement yet.

CUI customization problem

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • CUI customization problem

    So, I created this AutoLisp program which now runs perfectly well.

    I used the CUI to add a toolbar in the custom.cui, which contains a button which runs the macro to load my lisp program. The command is:

    (load "name.lsp")

    Now, there is a problem when I click on the new button. The program starts running, and all is well, but after a few inputs (always in the same part of the program), the CUI window automatically opens, and when I press cancel (i.e. every time i press it), a further part of my program is executed (i.e. the line commands in the program are executed one by one).

    I fear this is a problem with wrong customization, I have already spend a lot of time google-ing it up, but I don't see where the problem is right now.

    Any help appreciated on this one.

  • #2
    Hello .

    I have just seen the thread in this division , so anyway it is better to change the way you running or calling the lisp routine from .

    First call the command appload and chose contents and select your routine and add it to the list and close the dialog and after that close the dialog with load button pressed to invoke the Lisp routine .

    Now open the CUI and open you Toolbar button and insert the name of the routine instead of the macro to be called from the bottom later on and exit the dialog with accepting the and applying the changes.

    You may need to close Autocad and re-open it once again and you should press the bottom and get your routine started normally.

    Hope that helps and make sense .

    Regards,

    Tharwat
    Get learn and learn and practice , to become experienced guy .

    Comment


    • #3
      Thanks for the reply.

      I have already temporarily solved the problem by embedding the code into (defun c: ...), which creates a command which I can freely run without any additional syntax. Also, I have loaded this application in the contents box so it loads every time I start a new drawing.

      However, this command does not appear in any of the directories in the CUI. Obiously this means that it isn't a command yet. Do I create it as a new command, and place the command in the macro dialogue box after the ^C^C?

      Comment


      • #4
        Just add the name of your routine after the last C .

        ^C^CMyRoutineName
        Get learn and learn and practice , to become experienced guy .

        Comment


        • #5
          Thanks, this works just fine!

          Comment


          • #6
            Originally posted by John Kimble View Post
            Thanks, this works just fine!
            You're welcome John.

            Tharwat
            Get learn and learn and practice , to become experienced guy .

            Comment

            Working...
            X