+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    May 2008
    Posts
    23

    Default Whats a left mouse click in lisp???

    Registered forum members do not see this ad.

    HI all

    I have to name several view in a lisp routine but I just cant find whats a click to put in my lisp code .

    The furthers I got is this:

    (command "ucs" 3 basepoint1 Xaxis TopXaxis) ----to define my local axis for a steel angle
    Then I want to name this ****...so I did
    (command "+ucsman" 0 ???)
    when I do this the ucs window pops out and under the ""Named UCSs"" tab the "unmaned" view is selected. Now all i have to do is left click on it so i can name it, but how can I do that in my lisp code???
    I tried may stuff but I cant get it ....help please!!!!

    Thank you

  2. #2
    Super Member
    Using
    AutoCAD not applicable
    Join Date
    Jul 2007
    Posts
    639

    Default

    try
    Code:
    ""
    by left click you mean enter ??
    If at first you don't succeed, then maybe failure is more your style.

  3. #3
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    May 2008
    Posts
    23

    Default

    Quote Originally Posted by PS_Port View Post
    try
    Code:
    ""
    by left click you mean enter ??

    Thanks but I dont need an enter but a left click I need someting like

    (command "+ucsman" 0 ??? "view#1" )

    I tried lots of **** like:
    (command "+ucsman" 0 !. "view#1" )
    (command "+ucsman" 0 !. view#1 )
    (command "+ucsman" 0 \ "view#1" )
    (command "+ucsman" 0 / "view#1" )
    (command "+ucsman" 0 ; "view#1" )

    but damn...none of them work

  4. #4
    Forum Deity
    Using
    Civil 3D 2008
    Join Date
    Sep 2006
    Location
    Pittsburgh, PA, USA
    Posts
    3,581

    Default

    How about putting this in your code instead of ucsman
    Code:
    (setq ln (getstring "Enter name of UCS: "))
    (command "_ucs" "s" ln )

  5. #5
    Super Member
    Using
    AutoCAD not applicable
    Join Date
    Jul 2007
    Posts
    639

    Default

    Instead of ucsman why not try
    Code:
     
    (command "ucs" "r" "view#1")



    ---your too quick lpseifert---
    If at first you don't succeed, then maybe failure is more your style.

  6. #6
    Junior Member
    Using
    AutoCAD 2008
    Join Date
    May 2008
    Posts
    23

    Default

    Quote Originally Posted by lpseifert View Post
    How about putting this in your code instead of ucsman
    Code:
    (setq ln (getstring "Enter name of UCS: "))
    (command "_ucs" "s" ln )

    OMG UR A GOD!!!!

    THANK MAN YOU SAVED MY LOTS OF TIME!!!!

  7. #7
    Forum Newbie
    Using
    not specified
    Join Date
    May 2008
    Posts
    9

    Default

    In dotted pairs:

    LEFT CLICK=BUTTON 1= (3,0)
    RIGHT CLICK=BUTTON 2= (6,2)
    MIDDLE CLICK=BUTTON 3= (6,1)

    These are obtained using the GRREAD function.

    However in my Lisp programs I often call the middle button
    # 2 for sake of clarifying the finger positions. (This is
    assuming you have a 3-button mouse. A two button mouse still
    has the same return codes as the 3 button but without
    the (6,1) dotted pair return)
    Thanks to MS for the two button mouse.

  8. #8
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2011
    Join Date
    Apr 2008
    Posts
    6,015

    Default

    Registered forum members do not see this ad.

    i never have more than more than one non wucs view, so i always call it A.
    i use this quick routine to toggle b/w the two after i've created my alternate view if needed:

    Code:
    ;toggle between ucs world and ucs "A" ("A" must exist)
    ;alan thompson
    (defun c:UT()
    (if
        (equal (getvar 'worlducs) 1)
        (command "ucs" "r" "a")
        (command "ucs" "world")
    )
    (princ))

    autocad also has it's own pulldown ucs that can be useful.

Similar Threads

  1. Shift+Left Click=Image Select
    By Hardney in forum AutoCAD Drawing Management & Output
    Replies: 13
    Last Post: 6th Sep 2012, 11:57 am
  2. mouse left click
    By moosehead2 in forum AutoCAD Beginners' Area
    Replies: 8
    Last Post: 29th Apr 2008, 01:51 pm
  3. Problem when i click mouse
    By edckute100 in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 2nd Nov 2007, 04:32 pm
  4. Mouse Right Click
    By dbroada in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 12th Apr 2007, 10:43 am
  5. reconized mouse click or enter
    By jandres in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 9th Sep 2005, 01:06 am

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