Results 1 to 9 of 9

Thread: Newbie question: How do I get a command in LISP to stay "open" or "active"?

  1. #1
    All AUGI, all the time gfreddog's Avatar
    Join Date
    2003-07
    Location
    Pequannock NJ US of A
    Posts
    641
    Login to Give a bone
    0

    Default Newbie question: How do I get a command in LISP to stay "open" or "active"?

    Ok... so I have a LISP that I want to run and sets Rev Cloud to the setting I want then you can select the polyline object you want to turn into a Rev Cloud:

    ;RVCLD- Rev Cloud set to object

    (vl-load-com)
    (DEFUN C:RVCLDs()
    (COMMAND "LAYER" "SET" "1G_Rev Cloud" "")
    (command "_revcloud" "a" "3/16" "3/16" "s" "c" "o" txt)
    )
    So what this does is:

    Command: RVCLDSCurrent layer: "1G_Rev Cloud"
    Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: SET
    Enter layer name to make current or <select object>: 1G_Rev Cloud Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]:
    Command: _revcloud
    Minimum arc length: 3/16" Maximum arc length: 3/16" Style: Calligraphy
    Specify start point or [Arc length/Object/Style] <Object>: a
    Specify minimum length of arc <3/16">: 3/16
    Specify maximum length of arc <3/16">: 3/16
    Specify start point or [Arc length/Object/Style] <Object>: s
    Select arc style [Normal/Calligraphy] <Calligraphy>:c Calligraphy
    Specify start point or [Arc length/Object/Style] <Object>: o
    Select object:
    Command: nil
    How do I get it to stay on "Select Object" and stop closing?

    Thanks

  2. #2
    All AUGI, all the time
    Join Date
    2015-10
    Location
    Belgrade, Serbia, Europe
    Posts
    564
    Login to Give a bone
    0

    Default Re: Newbie question: How do I get a command in LISP to stay "open" or "active"?

    Code:
    (DEFUN C:RVCLD nil
    (COMMAND "._LAYER" "M" "1G_Rev Cloud" "")
    (COMMAND "._REVCLOUD" "A" "3/16" "3/16" "S" "C" "O")
    (PRINC)
    )
    M.R.

  3. #3
    All AUGI, all the time gfreddog's Avatar
    Join Date
    2003-07
    Location
    Pequannock NJ US of A
    Posts
    641
    Login to Give a bone
    0

    Default Re: Newbie question: How do I get a command in LISP to stay "open" or "active"?

    That was it thanks!

  4. #4
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Newbie question: How do I get a command in LISP to stay "open" or "active"?

    ... Or you could use the PAUSE keyword.

  5. #5
    All AUGI, all the time gfreddog's Avatar
    Join Date
    2003-07
    Location
    Pequannock NJ US of A
    Posts
    641
    Login to Give a bone
    0

    Default Re: Newbie question: How do I get a command in LISP to stay "open" or "active"?

    Quote Originally Posted by RenderMan View Post
    ... Or you could use the PAUSE keyword.
    huh? how does that go? Pls forgive the newness I'm learning LISP bit by bit

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Newbie question: How do I get a command in LISP to stay "open" or "active"?

    Quote Originally Posted by gfreddog View Post
    huh? how does that go? Pls forgive the newness I'm learning LISP bit by bit
    While not necessary in this circumstance, as Marko's suggestion is more succinct, in many instances the PAUSE keyword can be very useful. Here's an applicable example, that is functionally the same as Marko has posted above:

    Code:
    (COMMAND "._REVCLOUD" "A" "3/16" "3/16" "S" "C" "O" PAUSE)
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

  7. #7
    All AUGI, all the time gfreddog's Avatar
    Join Date
    2003-07
    Location
    Pequannock NJ US of A
    Posts
    641
    Login to Give a bone
    0

    Default Re: Newbie question: How do I get a command in LISP to stay "open" or "active"?

    Quote Originally Posted by RenderMan View Post
    While not necessary in this circumstance, as Marko's suggestion is more succinct, in many instances the PAUSE keyword can be very useful. Here's an applicable example, that is functionally the same as Marko has posted above:

    Code:
    (COMMAND "._REVCLOUD" "A" "3/16" "3/16" "S" "C" "O" PAUSE)
    Ah now that makes sense. Thanks for the info

  8. #8
    Active Member
    Join Date
    2001-03
    Location
    St. Louis
    Posts
    75
    Login to Give a bone
    0

    Default Re: Newbie question: How do I get a command in LISP to stay "open" or "active"?

    really elegant that would make the pause usefully necessary would be:
    (DEFUN C:RVCLD ( / strCurrentLayer)
    (setq strCurrentLayer (getvar "clayer"))
    (COMMAND "._LAYER" "M" "1G_Rev Cloud" ""
    "._REVCLOUD" "A" "3/16" "3/16" "S" "C" "O"
    pause
    "._layer" "m" strCurrentLayer ""
    )
    (PRINC)
    )

  9. #9
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,714
    Login to Give a bone
    0

    Default Re: Newbie question: How do I get a command in LISP to stay "open" or "active"?

    Quote Originally Posted by gfreddog View Post
    Ah now that makes sense. Thanks for the info
    You're welcome.

    FWIW -

    You may, or may not already use Command Reactor(s) in your setup, but this is a great illustration of where employing one is useful... That way, you also avoid having to account for the *error* thrown when trying to modify the CLAYER System Variable while the REVLCOUD Command is still 'active'.
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Similar Threads

  1. Replies: 0
    Last Post: 2013-12-13, 04:06 PM
  2. Replies: 0
    Last Post: 2012-06-06, 11:54 AM
  3. ENTIDADES EN ALIGNMENT COMO "FIXED", "FLOTING" y "FREE"
    By cadia in forum AutoCAD Civil 3D - General
    Replies: 1
    Last Post: 2009-02-01, 04:21 AM
  4. Replies: 8
    Last Post: 2007-04-04, 12:39 PM
  5. Replies: 3
    Last Post: 2006-03-23, 10:25 PM

Posting Permissions

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