+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Full Member
    Computer Details
    rodrigo_sjc_sp's Computer Details
    Operating System:
    Windows 7 (32bits) - Version 6.1 - Comp. 7601 SP1
    Computer:
    DELL
    CPU:
    Pentium(R) Dual-Core CPU E5300 @2.6GHz
    RAM:
    2,00 GB
    Graphics:
    1440 x 900
    Primary Storage:
    148GB
    Monitor:
    LG
    Discipline
    See details...
    rodrigo_sjc_sp's Discipline Details
    Occupation
    Analyst programmer
    Discipline
    See details below.
    Details
    Analyst programmer
    Using
    AutoCAD 2011
    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    96

    Default identify the execution of a command

    Registered forum members do not see this ad.

    Is there any way to identify the execution of a command?
    And do a procedure to execute a command supplement?

    A practical example would be:

    When you call Qsave, run and Qsave
    then then display a message on the screen?

    thank you

  2. #2
    Full Member
    Computer Details
    rodrigo_sjc_sp's Computer Details
    Operating System:
    Windows 7 (32bits) - Version 6.1 - Comp. 7601 SP1
    Computer:
    DELL
    CPU:
    Pentium(R) Dual-Core CPU E5300 @2.6GHz
    RAM:
    2,00 GB
    Graphics:
    1440 x 900
    Primary Storage:
    148GB
    Monitor:
    LG
    Discipline
    See details...
    rodrigo_sjc_sp's Discipline Details
    Occupation
    Analyst programmer
    Discipline
    See details below.
    Details
    Analyst programmer
    Using
    AutoCAD 2011
    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    96

    Default

    Could used the command "_.undefine" "_qsave" and define what I want within a new procedure qsave, more to lost the functionality is not good to me

    I need that when a certain command is executed, I can identify that the command
    was executed and run some other commands

  3. #3
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,741

    Default

    Use a Command Reactor with a callback function triggered by the :vlr-commandended event.

    Here is an introduction tutorial on reactors (from AfraLISP):

    http://www.afralisp.net/visual-lisp/...ors-part-1.php
    Lee Mac Programming

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

    Just another Swamper

  4. #4
    Full Member
    Computer Details
    rodrigo_sjc_sp's Computer Details
    Operating System:
    Windows 7 (32bits) - Version 6.1 - Comp. 7601 SP1
    Computer:
    DELL
    CPU:
    Pentium(R) Dual-Core CPU E5300 @2.6GHz
    RAM:
    2,00 GB
    Graphics:
    1440 x 900
    Primary Storage:
    148GB
    Monitor:
    LG
    Discipline
    See details...
    rodrigo_sjc_sp's Discipline Details
    Occupation
    Analyst programmer
    Discipline
    See details below.
    Details
    Analyst programmer
    Using
    AutoCAD 2011
    Join Date
    Oct 2012
    Location
    São Paulo - Brazil
    Posts
    96

    Default

    Registered forum members do not see this ad.

    Thanks Lee

    Below the code running in the future for those who want:
    Code:
    (if (null *save-reactor*)
        (setq *save-reactor* (vlr-editor-reactor nil '((:vlr-savecomplete . savedrawing))))
    )
    (defun savedrawing ( reactor params )
        (Alert "aaaaa")
        (princ)
    )

    To learn more events that you can access, follow the link:
    http://www.bricsys.com/bricscad/help.../Lisp_vlr.html

    the key is to change the 2 items in this command
    (setq * save *-reactor (vlr-editor-reactor nil '((: vlr-savecomplete. savedrawing))))

    vlr-editor-reactor and vlr-savecomplete

    In my case vlr-editor-reactor to pick stocks editing the file and vlr-savecomplete to run after save the DWG file

Similar Threads

  1. Consistency In Execution in Stand Alone VB Express 2008 appliaction - Acad2011
    By NirantarVidyarthee in forum .NET, ObjectARX & VBA
    Replies: 0
    Last Post: 8th Nov 2011, 05:12 pm
  2. How to identify the points in this figure ??
    By XuFyan in forum AutoCAD Beginners' Area
    Replies: 6
    Last Post: 1st Sep 2010, 07:07 pm
  3. Customizing user input during command execution
    By sekarr24 in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 21st May 2010, 07:11 pm
  4. Lisp execution error...solution needed..
    By goldy2000 in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 11th Sep 2009, 11:15 am
  5. Exit without execution error (VBA - v2000i)
    By Joltremari in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 23rd Jul 2006, 12:24 am

Tags for this Thread

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