+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Super Member chelsea1307's Avatar
    Computer Details
    chelsea1307's Computer Details
    Operating System:
    windows xp
    Using
    AutoCAD 2011
    Join Date
    Sep 2008
    Location
    Sacramento, Ca USA
    Posts
    1,109

    Smile missing a parenthesis i think

    Registered forum members do not see this ad.

    I finally found which lisp is causing me problems on my startup suite. Can anyone who knows something about lisp tell me why when this lisp loads it asks for me to select object to scale and stops the rest of the lsps in the startup suite from loading. any help would be great
    Code:
    ;; This lisp breaks a two lines which cross each other
    (defun c:sc ()
    (setq pick (entsel "\nPick:")) (terpri)
    (setq pnt (getpoint "\nPick point:" )) (terpri)
    (setq scl (getstring "0.5"))
    (command "scale" pick pnt scl ) 
    ) 
    (defun c:half ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 0.5)
    )
    (defun c:twice ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 2)
    )
    (defun c:1QUARTER ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 0.25)
    )
    (defun c:three4 ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 0.75)
    )
    defun c:alberto ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 1.5)
    )
    This one aaa lets you scale reference
    (defun c:aaa ()
    (command "OSNAP" "ins")
    (SETQ object (entsel "\n pick object"))
    (SETQ INS (GETPOINT "\NPICK POINT"))
    (command "scale" object "" INS "R" "6-1/64" "4.5")
    (command "osmode" "0")
    )
    (defun c:vsc ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt tom)
    )
    (defun c:t0 ()
    (command "style" "" "" 0 "" "" "" "" ""))
    )
    Last edited by chelsea1307; 30th Mar 2009 at 10:10 pm.
    "The problem is stupidity. I am not saying there should be capital punishment for stupidity, but, why don't we just take the safety labels off of everything and let the problem solve itself? "

  2. #2
    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

    Sounds like it has commands outside of the defined function (defun) - post it on here and I should be able to sort it for ya
    Lee Mac Programming

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

    Just another Swamper

  3. #3
    Super Member chelsea1307's Avatar
    Computer Details
    chelsea1307's Computer Details
    Operating System:
    windows xp
    Using
    AutoCAD 2011
    Join Date
    Sep 2008
    Location
    Sacramento, Ca USA
    Posts
    1,109

    Default

    oops, i meant to post that origionally
    "The problem is stupidity. I am not saying there should be capital punishment for stupidity, but, why don't we just take the safety labels off of everything and let the problem solve itself? "

  4. #4
    Senior Member
    Computer Details
    JohnM's Computer Details
    Operating System:
    xp pro
    Using
    AutoCAD 2006
    Join Date
    Feb 2009
    Location
    houston, texas
    Posts
    380

    Default

    try this it has a few problems

    Code:
     
    ;; This lisp breaks a two lines which cross each other
    (defun c:sc ()
    (setq pick (entsel "\nPick:")) (terpri)
    (setq pnt (getpoint "\nPick point:" )) (terpri)
    (setq scl (getstring "0.5"))
    (command "scale" pick pnt scl ) 
    ) 
    (defun c:half ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 0.5)
    )
    (defun c:twice ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 2)
    )
    (defun c:1QUARTER ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 0.25)
    )
    (defun c:three4 ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 0.75)
    )
    (defun c:alberto ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt 1.5)
    )
    ;;This one aaa lets you scale reference
    (defun c:aaa ()
    (command "OSNAP" "ins")
    (SETQ object (entsel "\n pick object"))
    (SETQ INS (GETPOINT "\NPICK POINT"))
    (command "scale" object "" INS "R" "6-1/64" "4.5")
    (command "osmode" "0")
    )
    (defun c:vsc ()
    (prompt
       "\nPick entities you want to scale: ")
       (setq ss (ssget))
    (setq pt (getpoint "\n Pick scale point: "))
    (command "scale" ss "" pt tom)
    )
    (defun c:t0 ()
    (command "style" "" "" 0 "" "" "" "" ""))

  5. #5
    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

    After quick glance - just tidied em up a bit:

    Code:
    (defun c:sc  (/ pick pnt scl)
      (setq    pick (entsel "\nPick:")
        pnt  (getpoint "\nPick point:")
        scl  (getstring "0.5"))
      (command "scale" pick pnt scl)
      (princ))
    
    (defun c:half  (/ ss pt)
      (prompt "\nPick entities you want to scale: ")
      (setq    ss (ssget)
        pt (getpoint "\n Pick scale point: "))
      (command "scale" ss "" pt 0.5)
      (princ))
    
    (defun c:twice    (/ ss pt)
      (prompt "\nPick entities you want to scale: ")
      (setq    ss (ssget)
        pt (getpoint "\n Pick scale point: "))
      (command "scale" ss "" pt 2)
      (princ))
    
    (defun c:1QUARTER  (/ ss pt)
      (prompt
        "\nPick entities you want to scale: ")
      (setq    ss (ssget)
        pt (getpoint "\n Pick scale point: "))
      (command "scale" ss "" pt 0.25)
      (princ))
    
    (defun c:three4     (/ ss pt)
      (prompt "\nPick entities you want to scale: ")
      (setq    ss (ssget)
        pt (getpoint "\n Pick scale point: "))
      (command "scale" ss "" pt 0.75)
      (princ))
    
    (defun c:alberto  (/ ss pt)
      (prompt "\nPick entities you want to scale: ")
      (setq    ss (ssget)
        pt (getpoint "\n Pick scale point: "))
      (command "scale" ss "" pt 1.5)
      (princ))
    
    (defun c:aaa  (/ object ins)
      (command "OSNAP" "ins")
      (SETQ    object (entsel "\n pick object")
        INS    (GETPOINT "\NPICK POINT"))
      (command "scale" object "" INS "R" "6-1/64" "4.5")
      (command "osmode" "0")
      (princ))
    
    (defun c:vsc  (/ ss pt)
      (prompt "\nPick entities you want to scale: ")
      (setq    ss (ssget)
        pt (getpoint "\n Pick scale point: "))
      (command "scale" ss "" pt tom)
      (princ))
    
    (defun c:t0  ()
      (command "style" "" "" 0 "" "" "" "" "")
      (princ))
    [a few could be written better imo]
    Lee Mac Programming

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

    Just another Swamper

  6. #6
    Super Member chelsea1307's Avatar
    Computer Details
    chelsea1307's Computer Details
    Operating System:
    windows xp
    Using
    AutoCAD 2011
    Join Date
    Sep 2008
    Location
    Sacramento, Ca USA
    Posts
    1,109

    Default

    i know... i didnt write any of these, i dont even use these... my office is afraid of change, even though i dont think anyone uses these anymore if i get rid of a file they freak, so i figured i would try to get it so it works without causing problems...
    "The problem is stupidity. I am not saying there should be capital punishment for stupidity, but, why don't we just take the safety labels off of everything and let the problem solve itself? "

  7. #7
    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

    Quote Originally Posted by chelsea1307 View Post
    i know... i didnt write any of these, i dont even use these... my office is afraid of change, even though i dont think anyone uses these anymore if i get rid of a file they freak, so i figured i would try to get it so it works without causing problems...
    I know exactly what you mean - the office I worked at was the same... only difference was that only one of them out of abour 10 had even heard of macros, DIESEL or LISP.
    Lee Mac Programming

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

    Just another Swamper

  8. #8
    Super Member MaxwellEdison's Avatar
    Computer Details
    MaxwellEdison's Computer Details
    Operating System:
    XP Pro (32-bit)
    Computer:
    Dell Precision PWS490
    CPU:
    Intel Xeon 5130
    RAM:
    4GB DDR2
    Graphics:
    nVidea Quadro FX 3500
    Monitor:
    Dell 20" LCD Widescreen (Main) NEC Accusync 125F 20" CRT (Secondary)
    Using
    Architecture 2009
    Join Date
    Dec 2008
    Location
    Lebanon, PA
    Posts
    734

    Default

    I actually have it the other way, my company is somewhat nudging me to learn C++ so I can maintain our scripts (for add-on hasbCAD) in the event my colleague (who writes said scripts) should succumb to the "hit by a bus" scenario. Unfortunately, the only actual coding I've ever done was making my Tandy beep out the Für Elise in QBASIC...
    Just because you're , doesn't mean wrong is all that's .

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

    Default

    Quote Originally Posted by Lee Mac View Post
    I know exactly what you mean - the office I worked at was the same... only difference was that only one of them out of abour 10 had even heard of macros, DIESEL or LISP.
    There's a designer (sic) here with 15+ years experience w/ cadd that refuses to use anything that isn't OOTB; no lisp, no pgp, he has to pick the commands from icons, he won't even use the wheel on his mouse to pan/zoom. It's hard to try to implement anything progressive (e.g. annotative text, dynamic blocks) when people refuse to try and learn. To each their own I guess...
    Oops, I didn't mean to hijack the thread.

  10. #10
    Super Member chelsea1307's Avatar
    Computer Details
    chelsea1307's Computer Details
    Operating System:
    windows xp
    Using
    AutoCAD 2011
    Join Date
    Sep 2008
    Location
    Sacramento, Ca USA
    Posts
    1,109

    Default

    Registered forum members do not see this ad.

    glad to know im not alone with this
    "The problem is stupidity. I am not saying there should be capital punishment for stupidity, but, why don't we just take the safety labels off of everything and let the problem solve itself? "

Similar Threads

  1. Parenthesis Flash Time
    By Lee Mac in forum AutoLISP, Visual LISP & DCL
    Replies: 12
    Last Post: 26th Mar 2009, 08:57 pm
  2. SHX missing
    By dusko in forum AutoCAD Beginners' Area
    Replies: 2
    Last Post: 7th Apr 2008, 01:47 pm
  3. Help with missing Properties box
    By ADS in forum AutoCAD Drawing Management & Output
    Replies: 1
    Last Post: 8th Mar 2007, 11:48 am
  4. USING QUOTATION MARKS OR PARENTHESIS IN A SCRIPT
    By TTALBOT in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 28th Jun 2006, 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